This is an old revision of the document!
Categories Plugin
The categories plugin (Since v4.2.0) allows you to generate a list of categories on any template file you want.
To call this function you would include the following code in any template file you want it to appear.
{categories parent=0 assign="pcat" show_total="no"} <h2>Categories</h2> {foreach from=$pcat item=entry name="cats"} {$entry.link} {/foreach}
The code above calls the plugin and assigns the results to the $pcat variable. Next we loop through the results and display it how we want.
Parameters
- parent
- (integer) The id of the parent category to start with.
- show_total
- (string) yes or no - Whether you want to show the total listings. Please note this can be slow.
- assign
- (string) The variable you want it assigned to. Default is “cats”.
Have more questions? Visit our community forums.