This simple plugin is basically equivalent to category_list, excepted that it is section-sensitive and only lists article categories.
Categories are displayed using their title and optionally their article count for the selected section and sorted alphabetically by title.
If no article is found in the section for a category, this category will not be shown.
- section: The section to display the related article categories. When ‘default’ (the frontpage) is specified, it shows all categories related to sections which are part of the frontpage. Default is the current section.
- sticky: When set to
true, will display the category list of ‘sticky’ articles instead of ‘live’ articles. Default is
- posted: Either ‘past’, ‘future’ or ‘all’. Will only count articles with the specified publication date. ‘all’ is slightly faster because MySQL will be able to cache the query. Default is ‘past’.
- parent: The parent category name. If specified, will return only the direct children categories for this parent. It will not show children of children. Default is any category.
- showcount: When set to
true, displays the number of related articles next to each category. Default is
- label: Label for the top of the list. Default is no label.
- labeltag: Independent wraptag for label for the top of the list. Default is empty.
- break: HTML tag to be used for line breaks, without brackets. Default is
- wraptag: HTML tag to be used as the wraptag, without brackets. Default is empty.
- class: CSS class attribute for wraptag, default is
- activeclass: CSS class attribute for the currently active category, if any. By default, the active category is displayed like the other ones.
This plugin only works with Textpattern 4.0.2 and above. Please upgrade if required.
- Code cleaning.
- Added the sticky attribute to display sticky articles categories instead of published articles categories.
- Small bugfix: using
<br />as a default value for “break”.
- Small bugfix: no more PHP warning if the list is empty.
- Added the labeltag attribute to conform with the new label behavior of Textpattern 4.0.2.
- Added the activeclass attribute to display the active category differently.
- Article count is now optional and disabled by default.
- Tweaked code.
- Only counts articles having the status set to ‘Live’.
- Compatible with table prefixes.