GWcode Categories Examples

Here are some examples to demonstrate what you can do with GWcode Categories:

Example 8 - Conditionals

Here's an example to show how to use conditionals:

{exp:gwcode_categories group_id="3|4"}
	{group_heading}<b>{cat_group_name}</b><br />{/group_heading}
	{if cat_group_name == "Blog"}
		<a href="{path="blog/{cat_url_title}"}">{cat_name}</a>
	{if:else}
		{if depth == 2}
			<a href="{path="add-ons/{cat_url_title}"}">{cat_name}</a>
		{if:else}
			{cat_name}
		{/if}
	{/if}
{/exp:gwcode_categories}