Hi Guys,
I’m have real trouble getting Categories to behave for me.
I have a Category Group with about 30 categories in it. There are 5 Parent Categories each with several Child Categories. One of the Child Categories has Child Categories of it’s own. In other words there are 3 levels to the hierarchy. (Parent > Child > Grandchild).
The following code works fine and shows all categories except those listed (14,27,28,7) and their children.
{exp:channel:categories category_group="3" channel="my-channel-name" show="not 14|27|28|7" style="linear" show_empty="yes"}
<h2><a href="http://{category_url_title}">{category_name}</a></h2>
<p>{/exp:channel:categories}The title of Category 20 shows up in the list as expected, as it is not excluded by the ‘Show’ option.
However, if I change the ‘Show’ option to ONLY show Category 20 (as below) - I get nothing!
{exp:channel:categories category_group="3" channel="my-channel-name" show="20" style="linear" show_empty="yes"}
<h2><a href="http://{category_url_title}">{category_name}</a></h2>
<p>{/exp:channel:categories}Category 20 DOES show up if I Show its Parent Category as well (Which I don’t want to do). i.e. show=“18|20”
Could it be because I turned “Auto-Assign Category Parents” OFF?
I had to do that because when I try to show Entries belonging to a Child Category, Parent Entries were showing up as well - which is just nuts!
I’ve spent a day trying to work this out - no joy!
Please help.