Log in | Register | Lost password

Bottom
Using Categories to Change CSS File Selection
  • Posted: 29.11.2007, 16:19
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I'm working on a site with 4 or 5 main category areas which will be listing in a horizontal NavBar across the top of the site. Each NavBar button will be a different color. What I'm trying to do is change the complete header background color and background graphics as a visitor selects each main topic. I decided the easiest way to do that was with different CSS files. However, to do this I need to use a global variable that can be reassigned every time the visitor selects a different category. I would then make the variable part of the CSS file name in the header to select the correct CSS. One problem is that many of the pages available from the sub-NavBar will not be Pagesetter pages, so the variable that I set and change really does need to be global.

    Additionally, I want to use the same global variable to select which options are available in the sub-NavBar. The sub-NavBar will be a Pagesetter block list, so comparing each entry's category to a global variable will be pretty easy...once I figure out how to set, change, and read that global variable.

    I'm working on this in PN 0.8 RC1 and Pagesetter 6.3.0.

    Any suggestions would be greatly appreciated.
  • Posted: 28.12.2007, 05:44
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Here's where I would start:

    http://smarty.php.net/manual/en/language.variables.smarty.request.php

Template courtesy of Designs By Darren.