Jump to content

i have a small problem - with category colours ....


cybermailer

Recommended Posts

Hello,

 

i've a little problem on php...this is my code:

 

$class = ($cid == 76) ? 'CatLevel2g' : ($cid == 75) ? 'CatLevel2r' : "$MainStyle$SubMenue";

            $categories_string .=   "$Pre$Tabulator<li class='$class'><a $Aktiv href='" . 
                                    xtc_href_link(FILENAME_DEFAULT, xtc_category_link($cid, $foo[$cid]['name'])) . 
                                    "'>" . $foo[$cid]['name'] . "$ProductsCount</a>\n";

 

cid = category id = e.g. APPLE or BANANA

CatLevel2 = Styleheet the Catlevel2(g) stands for GREEN and CatLevel2® stands for RED.

 

Now my problem ist that i want to color two categories manually. But the color would always be the color coded at last.

 

So both category are now in red. If i change the code in

 

$class = ($cid == 76) ? 'CatLevel2r' : ($cid == 75) ? 'CatLevel2g' : "$MainStyle$SubMenue";

 

the categories would be green.

 

How must the php code be to work fine?

 

thx

fine it works...

 

and how must it be if i want it for 4 times like

 

$class = ($cid == 76) ? 'CatLevel2r' : (($cid == 75) ? 'CatLevel2g' : "$MainStyle$SubMenue");

 

+ PLUS thisk

 

($cid == 74) ? 'CatLevel2y'

($cid == 73) ? 'CatLevel2b'

 

thank you for your help

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.