{module_categorylist}

Description

Renders an option list of categories.

Syntax

{module_categorylist id="123" maxLevel="1" collection="my_custom_collection_name" template=""}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

Layouts

This module is not rendered with a layout.

Examples

When using this module always wrap it in a select tag like so:

<select>
{module_categorylist}
</select>

It will output a drop down containing the categories on your site


<select>

<option value="-1">-- All Categories --</option>

<option value="32142">Category1</option>

<option value="28940">---Category1A</option>

<option value="43243">Category2</option>

<option value="29324">---Category1</option>

</select>

{module_categorylist id="-1" maxLevel = "1"}

Will display only the top level categories (root categories one level deep).

Syntax

{module_categorylist, id}

Parameters

Layouts

This module is not rendered with a layout.

Parameters

  • id - the ID of the category

Examples

When using this module always wrap it in a select tag like so:


<select>
{module_categorylist}
</select>

It will output a drop down containing the categories on your site


<select>

<option value="-1">-- All Categories --</option>

<option value="32142">Category1</option>

<option value="28940">---Category1A</option>

<option value="43243">Category2</option>

<option value="29324">---Category1</option>

</select>