Content last modified Monday 3 September 2018
hop to #bottom
Categories:
Author:
Current version:
0.9
About It:
Get it:
Rate it:
  • Helpful?
  • 7 Yes
  • 6 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

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 is false.
  • 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 false.
  • 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 br instead 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.

Article Request Count:
Initially released:
2005-09-15
Posted here:
15 Sep 2005

You know you want to visit the Archives.
Published with Textpattern