Categories:
Author:
Current version:
0.9
About It:
Get it:
Rate it:
Flag it:
cbs_category_list
Description
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.
Syntax
<txp:cbs_category_list />
Attributes
Required
none.
Optional
- 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 isfalse. - 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 isfalse. - 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
br. - wraptag: HTML tag to be used as the wraptag, without brackets. Default is empty.
- class: CSS class attribute for wraptag, default is
cbs_category_list. - activeclass: CSS class attribute for the currently active category, if any. By default, the active category is displayed like the other ones.
Important
This plugin only works with Textpattern 4.0.2 and above. Please upgrade if required.
Changes history
v0.9 (2006-09-27)
- Code cleaning.
v0.8 (2006-09-16)
- Added the sticky attribute to display sticky articles categories instead of published articles categories.
v0.7 (2006-07-27)
- Small bugfix: using
brinstead of<br />as a default value for “break”.
v0.6 (2006-06-28)
- Small bugfix: no more PHP warning if the list is empty.
v0.5 (2005-11-21)
- Added the labeltag attribute to conform with the new label behavior of Textpattern 4.0.2.
v0.4 (2005-10-13)
- Added the activeclass attribute to display the active category differently.
v0.3 (2005-10-05)
- Article count is now optional and disabled by default.
- Tweaked code.
v0.2 (2005-10-01)
- Only counts articles having the status set to ‘Live’.
- Compatible with table prefixes.
v0.1 (2005-09-15)
Initial release.
Initially released:
2005-09-15Posted here:
15 Sep 2005Article modified:
15 Nov 2008









You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:
Commented (24)
Fatal error: Call to undefined function pagelinkurl() in textpattern/lib/txplib_misc.php(429) : eval()’d code on line 50
This is looking really useful for me…thanks!..except that is there any way to sort by any means other than alpha?
The article count for each category is just what I needed. Thanks!
Hi, it doesn’t work with the mlp-pack..when switching the language it shows only the standard title..
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site. Get a Gravatar.
Would you care to write a comment or visit the forum discussion?