Hi Everyone!
Yet again I am stuck due to my very poor HTML skills.
Basically I need a list marker to appear besides each category type and sub category and sub sub category etc etc but I need each "level" of categories to be indented.
The original code for my template has list markers in a single column so even if you click on a subcategory the list marker would remain in place while the category name would be indented. here is an idea:
As you can see in the image "Rings" is one of the top main categories and it has a subcategory "925 Sterling Silver".
"925 Sterling Silver" subcategory also has subs: Amethyst, Black Onyx etc etc.
Yet the list markers are in one vertical line and dont get indented according to the category tree level.
This is the relevant part of my code in tpl_categories.php
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 {
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
if ($box_categories_array[$i]['current']) {
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
} else {
$content .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
}
} else {
$content .= $box_categories_array[$i]['name'];
}
//if ($box_categories_array[$i]['has_sub_cat']) {
// $content .= CATEGORIES_SEPARATOR;
//}
$content .= '';
if (SHOW_COUNTS == 'true') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}
}
$content .= '</a></li>' . "\n";
}
As you can see there is an <li> tag in:
else {
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
Which makes the list markers appear but incorrectly!
Please help me know which tags to insert so that the list markers next to each category display next to the category level and not in just one straight vertical column line.
I hope this all makes sense - THANKS!
Bookmarks