Personal tools
You are here: Home Documentation Tutorials Switching Skins Synchronizing Skin Layers and CSS/Javascript Resources
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Synchronizing Skin Layers and CSS/Javascript Resources

How to ensure that the proper CSS/Javascript resources are used in different skins.

George Lee

This Tutorial describes how Plone chooses a skin when you open a web page, and then describes the multiple ways that you can intervene to switch the skin. The Tutorial also discusses two common use cases, switching skins based on URL and the type of user (e.g., Anonymous or Authenticated).
Page 7 of 8.

Switching skins changes what skin layers in portal_skins are used, but it does not switch what CSS and javscript resources to load. This could be disastrous if you have CSS that applies only to the page templates in one skin, but not to the page templates in another skin.

The solution is simple: in the portal_css or portal_javascripts tools, just add a condition on certain resources similar to

python:portal.getCurrentSkinName() == 'My Public View'
 
by George Lee last modified October 21, 2006 - 20:06 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by