Info
- 4 posts
- 2 voices
- Started 3 years ago by Null
- Latest reply from bobbyh
- This topic is not resolved
Is this possible? (advanced templating)
-
- Posted 3 years ago #
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
-
- Posted 3 years ago #
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.
-
- Posted 3 years ago #
Can this be done with entire templates too? Perhaps in topic.php or something (cant try this at the moment)
-
- Posted 3 years ago #
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. :-)
-
You must log in to post.