Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is this possible? (advanced templating)


  • Null
    Member

    @null

    Well thisd is what I want. I have 1 forum and it has 2 forum cats. Lets call them forum 1 and forum 2.

    Now I have the kakumei them running (green). Now I want forum 1 to be green, but if they go to forum 2, I want it to be blue (kakumei blue).

    So is it possible to have different colors/themes for each category? Or some dirty hack to do this? This is also need for subforums to give them a different style, but fornow I just need it per category.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

  • bobbyh
    Member

    @bobbyh

    Yeah, assuming the themes have consistent HTML, in the header, put something like this:

    <link rel="stylesheet" href="<?php if ($forum_id == 1) bb_stylesheet_uri(); elseif ($forum_id == 2) echo '/my-templates/kakumei-blue/style.css'; ?>" type="text/css" />

    I didn’t test this, but I think that code should work.


    Null
    Member

    @null

    Can this be done with entire templates too? Perhaps in topic.php or something (cant try this at the moment)


    bobbyh
    Member

    @bobbyh

    If you want varying HTML depending on what the forum id is, you should probably just use a conditional if/inside of one template file like so:

    <?php if ($forum_id == 1) {

    echo 'html1';

    } elseif ($forum_id == 2) {

    echo 'html2';

    ?>

    Any other approach will probably lead to madness. :-)

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar