Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
just a bit of presentation luxury?
i think there should be a way of toggling themes between pages? say, you use the 'blackdiamond' as your main theme but want the comments page to appear in 'blackandwhite'?..
0
This discussion has been closed.
Comments
Anyway, if you want different styles for different pages, the best way would probably be to get the parts of each style you want, and put them into a new one. Every page has its own class in the body tag. For instance, the comment pages have CommentsPage, the accounts page has AccountPage and so on. So it shouldn't be too hard to merge two styles, and make sure they're only applied to the right pages.
if ($Context->selfUrl == "comments.php") { $Context->Head->ClearStyles(); $context->Head->AddStyleSheet( [.. style you want .. ] ); }
You obvisouly have to repeat the addstyle for each style that you need, this may be more than just your theme. And also repeat the entire if sentence per page that is to get an exception. I hope this helps. Look here for documentation: Head class
as for the pages-solution, then what about the body-background and the panel?
@ MrDo - thanks, i'll try that
I hadn't really thought of the panel, but I guess you'd take all #Panel styles from blackdiamond and change
#Panel
into.DiscussionsPage #Panel
and the#Panel
things from blackandwhite, and change those into.CommentsPage #Panel
. That way they'd only be parsed on the right page. But as I said, Mr Do's solution might be easier, since it would save you digging through the styles, and would be super upgrade-proof as well.