We noticed a strange and annoying behavior when assigning categories to entries in a channel.
It is a channel that is a legislative repository consisting of 94 categories grouped alphabetically, so there are 25 categories with a different number of child categories each.
We have created a unique dynamic template to show the entries in each child category, and another index template showing categories alphabetically grouped under the parent category.
Now comes the problem: if the entry has been created and categorized after creating the parent alphabetical category, the page that displays the entries in this child category shows both categories, parent and child, even if we use the conditional.
{categories}
{if parent_id != '0'}
{category_name}
{/if}
{/categories}For example, for a given entry belonging to the category “Education” also shows the parent category “E”.
Conversely, if the parent category has been created after alphabetic categories children, this does not happen and shows only the child category by means of the conditional use.
But when creating a new entry in a category that already belongs to a parent category, that takes both the parent and child category, even when using the former conditonal.
Any help is welcome.
Many thanks in advance for your attention.
Amadeu Sanz
Intersindical Valenciana