====== NP_CatListVars.php ====== //Adds variables available in the Category List Item field of templates.// ^General Plugin info ^^ ^Author: | [[http://revcetera.com/ftruscot/|Frank Truscott]] | ^Current Version: | 1.0 | ^Download: |[[http://revcetera.com/ftruscot/downloads/nucleus_plugins.html#catlistvars|NP_CatListVars.zip]]| ^Forum Thread: |[[http://forum.nucleuscms.org/viewtopic.php?t=18682|here]]| =====Prerequisites===== **Requires Nucleus CMS version 3.40 or higher** =====Installing===== - Unzip the file and upload the contents to your plugin directory - [[http://faq.nucleuscms.org/item/35|Install the plugin]] - Add category template variables as described below =====How to use the plugin===== Install it and add the variables to your template as desired =====Available TemplateVars===== //The variables described below are only available in the Category List Item field of your templates and can be used to enhance the category lists on your site.// * **<%numitems%>** : displays the number of items in the listed category. * **<%catiscurrent%>** : displays 'yes' if the listed category is the currently selected category. displays 'no' otherwise. This is useful for having different CSS classes to display the category element. =====Options===== //None// =====Tips and Tricks===== An example of a Category List Item field using these extra variables: In CSS file: .currentcat_no a { font-weight:normal; } .currentcat_yes a { font-weight:bold; } In Category List Item field of the template used to display your categorylist:
  • <%catname%> [<%numitems%>]
  • Results as HTML:
  • Cars [20]
  • Downloads [13]
  • General [51]
  • Sports [37]
  • To Do [3]
  • To viewer it looks like: * Cars [20] * **Downloads [13]** * General [51] * Sports [37] * To Do [3] =====Wishlist===== =====Bugs===== =====History===== * Version 1.0, released 13 April 2009 ] * initial release