This may already exist, but I couldn’t find it. It outputs a pipe-delimited list of child categories of a particular parent category. I created it because I wanted an easy way to display only entries that are assigned to categories that are children of another category. I didn’t want to auto-assign the entries to the parent category (for one thing, I already had a bunch of entries in there that I would have had to go back and edit).
If you use this in the category parameter of your weblog:entries tag, you will also need to add parse=“inward” to weblog:entries.
Parameter:
id - the id of the parent category to use.
Example:
{exp:weblog:entries weblog="news" category="{exp:vz_subcategories id="5"}" parse="inward"}
For now, this only gets the immediate children. If you have a third level, they won’t be displayed. If anyone needs that functionality, let me know. It shouldn’t be too hard to add.
Changelog
1.0.2 - Changed the plugin name to “VZ Subcategories” so as not to conflict with the pre-existing Child Categories plugin.
1.0.3 - Respect the category sort order.
