Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
request for category_list tag doc
category_list
follow the same rules as section_list
: you can give a specific order.
But for that to work, you need to explicitly set sort = ""
.
The doc should reflect that.
I can do a PR or whatever works. Just point me the direction ;)
Offline
Re: request for category_list tag doc
planeth wrote #317183:
category_list
follow the same rules assection_list
: you can give a specific order. But for that to work, you need to explicitly setsort = ""
.
Eek, it’s not supposed to, AFAIK. <txp:section_list>
should allow you to specify a sections
attribute that should keep its given order unless you override it with a sort
attribute. Same for <txp:category_list>
and the categories
attribute.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: request for category_list tag doc
Well, if you don’t explicitly set sort = ""
when using category_list
with attribute categories
for a given order, Textpattern will default to a sort order by name.
I just checked the 2 definitions in taghandler.php
and the sort
attribute has a default in category_list
Voila, voila :))
Offline
Re: request for category_list tag doc
planeth wrote #317189:
Well, if you don’t explicitly set
sort = ""
when usingcategory_list
with attributecategories
for a given order, Textpattern will default to a sort order by name.
Ah yes, you’re correct. I was testing on bleeding edge 4.x-dev where Oleg has patched the problem. Sorry for the confusion.
Maybe we do need a Txp 4.7.4 after all…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: request for category_list tag doc
Also makes me wonder if section_list’s sort attribute should be defined the same way:
'sort' => empty($atts['sections']) ? 'name ASC' : ''
??
EDIT: Hmmm, or maybe not as it’s handled explicitly a little further into the function.
Last edited by Bloke (2019-03-20 16:16:01)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: request for category_list tag doc
Offline