Documentation

Features

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.

*Note: If each of your parent categories do not have similar numbers of child categories, the categories table layout can become askew. If this is the case, we recommend that you remove the categories plugin call from your template file.

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.