Skip to main content
November 20, 2008
Question

Conditional Tag Stylesheet Reference?

  • November 20, 2008
  • 5 replies
  • 614 views
I have a branded version of help and a generic version of help.

I originally set this up using two different templates, each with their own separate stylesheet.

But this is extra work when I output layouts. I have to switch all topics from one template to another. (Ideally you should be able to select a template in the layout options, no?)

I'd like to use one template and use conditional tags to show the appropriate stylesheet. Is this possible?

Or is there some other way to accomplish the same thing?

Thanks for your help.
    This topic has been closed for replies.

    5 replies

    RoboColum_n_
    Legend
    November 20, 2008
    I'm afraid not without manually assigning the template.
    November 20, 2008
    That is what I'm doing now.

    I'm asking if there is a way to do it programatically/automatically so I can batch generate both layouts without manually having to swap out templates or stylesheets.
    Peter Grainge
    Community Expert
    Community Expert
    November 20, 2008
    "What I'm trying to do is generate 2 layouts from the same topics that use different stylesheets, w/o having to switch templates."

    What I suggested does allow you to switch CSS without switching template. Sorry misunderstood you.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    November 20, 2008
    I'd just like to change the reference to another stylesheet, for example from styleBrand.css to styleGeneric.css.

    I'm only using the template so I can have separate stylesheets. (I'm using tags to show different content in the headers and footers.)

    Thanks again.
    Peter Grainge
    Community Expert
    Community Expert
    November 20, 2008
    So assuming all topics have one CSS, in the topic list select all the topics and right click. In Properties select the other style sheet and generate. Then revert back.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    November 20, 2008
    I'm using RH 7.

    I'm using variables and tags. That works great.

    What I'm trying to do is generate 2 layouts from the same topics that use different stylesheets, w/o having to switch templates.
    Peter Grainge
    Community Expert
    Community Expert
    November 20, 2008
    Is the change just the CSS stylesheet or does the template have to change as well?

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Peter Grainge
    Community Expert
    Community Expert
    November 20, 2008
    Depending on your version of RH and quite how the branding is implemented, sounds like Variables could help. In one version a value could be GenericName and in another BrandX.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.