I’m having trouble getting my category-based content to appear. I have a product page that displays one entry, like a single book or DVD. On this product page I have a series of conditional statements under the product images and description:
{if '{categories}{category_url_title}{/categories}' == 'books'}
{embed="includes/details_books"}
{/if}
{if '{categories}{category_url_title}{/categories}' == 'audiobooks'}
{embed="includes/details_audiobooks"}
{/if}There are several more of these statements, one for each category (books, dvds, etc.) in the “products” channel.
This product template accurately displayed the embedded category content until I added another level of subcategories. Now, instead of only having books, dvds, etc., I have Books - Foundation Series, Books - Discipleship Series, etc.
The statements no longer display the category-specific content.
I tried replacing the ‘books’ in the statement with ‘books_foundation_series’, which is a sub-category name, but it doesn’t seem to display the embedded content.
Any ideas on how to display the content based on the parent category, even though the product is also in a lower sub-category?
Your help is greatly appreciated!
~Sarah