I’m developing a skin for Plone 3.x. The skin have a lot of differences from the default theme, and i would like to keep the default skin in administration mode. I read some solutions like this http://maurits.vanrees.org/weblog/archive/2008/01/switch-your-skin-based-on-the-url . But I cannot use subdomains in my web, so I cannot use these solutions.
I’m thinking that the solution would be something like that:
In my main_template.pt:
<tal condition:”true: Autenticated as admin”>
”Put here the specifics css
</tal>
But I don’t know the correct sintax in Plone
Thank you.
Your solution will work – but there are better ways. You don’t describe how your stylesheets are installed, but here are two ways to do it.
Either, if you have a policy product, put the following in your product’s profiles/default/cssregistry.xml:
or; visit “portal_css” in the ZMI (Zope management interface). There you can do the same thing by “Add”ing the two stylesheets shown above, where “condition” is the value from “expression” above.
These are the same thing – one just sets it through the web, the other through GenericSetup – and now Plone will automatically incorporate one or the other css file into every page without you having to change main_template.pt. Which is something you should never, ever, do.