GWcode Categories Examples

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

Example 5 - Category based breadcrumbs

In this example, I'm creating a breadcrumb trail for an entry. The entry has been assigned to two categories: "ExpressionEngine" and its child category "GWcode Categories", which both belong to a category group named "Add-ons".

I want to be able to create a trail which looks like this: Home » Add-ons » ExpressionEngine » GWcode Categories » Overview.

This is what I would use in my template for the entry page:

{exp:channel:entries channel="add-ons" limit="1"}
	<a href="{site_url}">Home</a> &raquo;
	{exp:gwcode_categories entry_id="{entry_id}" style="linear"}
		{if group_start}<a href="{path="add-ons"}">{cat_group_name}</a> &raquo;{/if}
		<a href="{path="add-ons/{cat_url_title}"}">{cat_name}</a> &raquo;