okay well I sat down and told myself that I wouldn't get up unless I got this thing to work... well it almost works... all I need to do is get rid of the stupid indent and it should be good to go... here is what I have as of right now... if you see anything wrong (I'm sure there is) please let me know!
Thanks...
This code is in the tpl_information file... remember I have installed the betterCategories mod already.
<?php
$content = '';
for ($i=0;$i<sizeof($information);$i++) {
switch(true) {
case ($information[$i]['top'] == 'true'):
$new_style = 'category-top';
break;
case ($information[$i]['has_sub_cat']):
$new_style = 'category-subs';
break;
default:
$new_style = 'category-products';
}
if (zen_get_product_types_to_category($information[$i]['path']) == '3' or ($information[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip it this is for the document box
} else {
$content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $information[$i]) . '"><div class="betterCategories">';
if ($information[$i]['current']) {
if ($information[$i]['has_sub_cat']) {
$content .= '<span class="category-subs-parent">';
$content .= info_with_pointer($information[$i], 'down');
$content .= '</span>';
} else {
$content .= '<span class="category-subs-selected">';
$content .= info_with_pointer($information[$i], 'nosub');
$content .= '</span>';
}
} else {
if ($information[$i]['has_sub_cat']) {
$content .= info_with_pointer($information[$i], 'right'); }
else {
$content .= info_with_pointer($information[$i], 'nosub'); }
}
if ($information[$i]['has_sub_cat']) {
$content .= CATEGORIES_SEPARATOR;
}
//$content .= '</a>';
$content .= '</div></a>';
}
}
//this is the function that inserts the 'pointer' (or 'disclosure triangle')
//before the name of the category, in the 'Categories' sidebox.
//$categoryName should be a string as contained in
//$box_categories_array[$i]['name'] above, which already includes
//the category name with all the necessary subcategory indents up front,
//as specified by the user in the Admin Panel.
//$categoryType will be either 'down', 'right' or 'nosub', which
//specifies which picture appears next to the category name:
function info_with_pointer( $categoryName, $categoryType) {
//picking the appropriate pointer image:
switch ($categoryType) {
case "down":
$pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . '/cat_pointer_down.gif');
break;
case "right":
$pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . '/cat_pointer_right.gif');
break;
default:
$pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . '/cat_no_sub.gif');
}
$pointer .= $categoryName;
return $pointer;
}
?>