New Zenner
- Join Date:
- May 2008
- Posts:
- 1
- Plugin Contributions:
- 0
category images over category titles in header
I'm the usual: new to zencart. I have searched (and think kobra and hairdo are awesome already), and found several topics that are similar, but slightly different.
I'd like the uploaded category image to be displayed (and also an active link) above the category names which run along the top of the page. The side columns were removed, so there's no issue there. Based on my reading, this isn't an admin thing, and requires an actual hack.
I do have a basic dev background, I'm just so new to the zen. I found the call from the category page:
<?php
if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
// categories_image
if ($categories_image = zen_get_categories_image($current_category_id)) {
?>
<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
<?php
}
} // categories_image
?>
Clearly the zen_image function calls the sucker. Now, how do I get that function to work from the header categories? I'm just not familiar enough with the variables to understand why it doesn't work when I just slap it in to categories_tabs.php:
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT) . $categories_tab_current . '</a> ';
$categories_tab->MoveNext();
``` Clearly $categories_image was a leftover from where I found this thing. How do I alter it to work properly?
Followup: What are recommendations to get it to display on top of the category title? I dare not resort to tables *shudder*, but it's in an <li>. Suggestions?
Thank you in advance!