No, I took it out. Returned both to original.
No, I took it out. Returned both to original.
And you see /includes/templates/12volt/sideboxes/tpl_categories.php and /includes/templates/12volt/css/stylesheet_categories_dressing.css in your test store?
I have looked and overlooked but can't find how to remove (hide) the category test from the sidebox when no image is available. I put the categories in question in a center table as images with links to make the main page look more uniform. I want to be able to hide the text from the right sidebox.
Well-Grounded Kids
Thanks in advance for your advice.
tin
Find this near the top of your tpl_categories.php:and addPHP Code:$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {
$current_path == 15 or $current_path == 16 or
to get:This will skip those categories in the sidebox output.PHP Code:$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
if ($current_path == 15 or $current_path == 16 or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {
You may need to add a bit of code to hide subcategories of those top cats. If this is the case, one thing that may work correctly is to use (int)$current_path in place of $current_path.
If that does not do the right job, there is another method thai I know will work.
Last edited by gjh42; 5 Mar 2008 at 08:17 PM.
Glenn you are a giant and a genius. It worked perfectly! I have been racking my tiny brain for a couple days over this. Your categories dressing contrib is the best.
Thank you,
tin
Glenn, with your infinite wisdom would you show me how to hide a categorie from the Nav Categories Tab? I am assuming this is the correct file to edit: includes/templates/your_template/templates/tpl_modules_categories_tabs.php
hide $current_path == 16 from the navcattabs?
Thanks,
tin
That file would be difficult to modify to single out one category for hiding. A better place would be /includes/modules/your_template/categories_tabs.php, where the output is built. Find this:and add a test to get this:PHP Code:$links_list = array();
while (!$categories_tab->EOF) {
// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}
// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
$categories_tab->MoveNext();
}
I haven't tested this and can't guarantee it will be free from oddities, but I think it will work ok.PHP Code:$links_list = array();
while (!$categories_tab->EOF) {
if ((int)$cPath != 16) {//skip cat id 16
// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}
// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
}//skip cat id 16
$categories_tab->MoveNext();
}
Glenn,
I really want to say thank you for your time and help on this.
I figured out what the problem is.
My test store is semi broken. It seems as though anything I click on takes me to the original live store.
I installed this mod on the live store for just a few moments to verify that it works. It Does!
Thanks again,
John
I do have another question for you Glenn.
What is your best advice for using this mod with lots and lots of categories?
If the images are only 25px the site will go on for miles and that's only cat tops.
Thanks
John