Salvo Posted November 10, 2002 Posted November 10, 2002 Hi, I need some help, in default.php there is one stylesheet... and this style set the colours for the all default.php Clicking on a category, this stylesheet is used again, but I would like to use another to change all the colours. then clicking on sub-category, again I would like to change all the colours again... can someone help on how to use better this at least 3 stylesheets in the same default.php. Thanks for help
mattice Posted November 11, 2002 Posted November 11, 2002 Do a check on the parameters on the URL. So if they say default.php?cPath=2 you show a different stylesheet. You do that with a switch (or alternatively with if statements) HTH, Mattice "Politics is the art of preventing people from taking part in affairs which properly concern them"
Salvo Posted November 11, 2002 Author Posted November 11, 2002 Mattice, I am never get right the "if statement." could you place it for me? below is the part which I would like switch to a new stylesheet. Could you show me where and how? THANKS Salvo <?php } else { // default page ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
mattice Posted November 11, 2002 Posted November 11, 2002 if ($whatever != 'something') { // do things if $whatever does NOT match 'something' echo '<html line of stylesheet that needs to be included>'; } or if / else if ($something_else == 'match') { // do things if $something_else matches 'match' exactly echo '<html line of stylesheet that needs to be included>'; } else { echo '<html line of DEFAULT stylesheet to be included>'; } 'something' and 'match' could also be $variables in these examples. have a look at http://www.php.net/control-structures using 'switch' is better / faster instead of mucho if statements. "Politics is the art of preventing people from taking part in affairs which properly concern them"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.