Category Side Box as Unordered List

Fred's picture

For some unknown reason the creators of Zen Cart chose to not use an unordered list for the categories sidebox. Save the attached file as includes/templates/<current template>/sideboxes/tpl_categories.php (Note: link is now working again) and you'll have your sensible unordered list!
Once that is done go to admin -> Layout Settings and delete the entry in:

Categories Separator between the Category Name and Sub Categories

Finally, add something like the css code below to tidy up the display:

/* Categories sidebox */
#categoriesContent ul {
  list-style-image:none;
  list-style-position:outside;
  list-style-type:none;
  margin:0 0 0 10px;
  padding:0;
}
 
#categoriesContent ul li {
  margin: 3px 0 0 0;
  padding: 0;
}
 
/*#categories #categoriesContent a:hover, #categories .category-subs-selected {*/
#navColumnOne a:hover, #navColumnTwo a:hover, #categories .category-subs-selected {
  color: #CC0000;
}
 
#categories .category-subs-parent {
  color: #265780;
}

This will remove the list marker, tighten up the indentation and colour the main and sub-headings when seleted.
I cannot remember where I got the tpl_categories.php file from - but I will link to the source as soon as I can find it.

AttachmentSize
tpl_categories.php_.txt5.78 KB