Hi there,
We've got a page where we're showing the category image as a header. We're using standard ZC code (tpl_index_categories.php):
If we're in a main category, it's showing one image; if in a sub-category, it's showing another image. However, I would like to show the main category image even when in a sub-category, as we're using the sub-category image slightly differently.Code:<?php if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') { // categories_image if ($categories_image = zen_get_categories_image($current_category_id)) { ?> <?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?> <?php } } // categories_image ?>
So in essence, whether you're in a main category or one of its sub-categories, it should always output the image associated with the main category. Is this possible? I thought something like $parent_category_id would work, but doesn't seem to.
Happy for any help on this. The site is not live yet, so unfortunately can't add a URL.
Thanks, Karl



