I’ve written an EE plugin that will let you show all ancestor categories of a given category. I call it the ‘Breadcrumb’ plugin. It’s attached to this post as ‘pi.breadcrumb.txt’. To use the attachment (save it into your plugin folder and) rename it to pi.breadcrumb.php.
Please try it out and give me your feedback about bugs etc. I plan to add the final version to the pMachines list of plugins for EE if you like. Thanks.
Note:
This plugin and the “Subcategories” Plugin are a pair.
The “breadcumb” Plugin will show the ancestor categories of a category and the “Subcategories” plugin will show the children categories of a category.
Well it’s rather easy. Both plugins use a current category, which can come from the url, or the “root_node” plugin parameter.
Assuming you have a category group with the following categories, and that your current category is 1.1.1:
1 –1.1 —-1.1.1 ——1.1.1.1 ——1.1.1.2 ——–1.1.1.2.1 ——–1.1.1.2.2 ——–1.1.1.2.3 ——1.1.1.3 —-1.1.2 —-1.1.3 etc.
a) The breadcrumb plugin will show you all ancestor categories of category 1.1.1. In this example:
1 1.1
b) The Subcategories plugin will show you all children categories of category 1.1.1. In this example:
1.1.1.1 1.1.1.2 1.1.1.3
See attached illustration:
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.