What’s the easiest way to get the parent category name?
{parent_id} is a available but how to get the name?
The way I’ve structured the site is that the only accessible categories are the 3rd depth in the hierarchy, no entries are categorized in the parents….
{exp:channel:category_heading}
<h1>{parent_id}</h1> {!-- I want this to be the name not a number! --}
<h2>{category_name}<h2>
{if category_description}
{category_description}
{/if}
{/exp:channel:category_heading}
parent_idAlso is there a way to implement a system whereby by selecting one of the parent categories, (which have no entries assigned) entries from all the child categories are displayed ?
Thanks in advance,
j00lz
Nearly a week and no replies :(
Here’s a solution using category_parents addon
{exp:channel:category_heading channel="blog" relaxed_categories="yes"}
{exp:category_parents:parent category="{parent_id}"}
{cat_description}
{/exp:category_parents:parent}
{category_name}
{/exp:channel:category_heading}Now, I’ve got a list of categories and I’d like to highlight the current categories parent.
Usually you’d go about matching the URL segment with the category list but I’m not sure how to do this for the parent category.
Also still can’t figure a way to allow selecting a parent category to show all child channel entries.
Any help on these would be much appreciated.
Cheers,
Julian
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.