Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

colour coded Categories?


Recommended Posts

Any ideas how to make each of the Categories have a different background colour!!!


I'd define a group of colored span backgrounds in the stylesheet.css, called spancat0, spancat1 etc, and use the i counter for the categories ... then do this


    if (isset($cPath_array) && in_array($counter, $cPath_array)) {
     $categories_string .= '<span class="spancat"' . $i . '"><b>';

// display category name
   $categories_string .= $tree[$counter]['name'];

   if (isset($cPath_array) && in_array($counter, $cPath_array)) {
     $categories_string .= '</b></span>';


I haven't tried this and if you do backup your old box code.







addicted to writing code ... can't get enough of databases either, LOL!


my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum


Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...