Plone Radical Reskinning When one size doesn’t fit all.

14
Plone Radical Reskinning When one size doesn’t fit all

Transcript of Plone Radical Reskinning When one size doesn’t fit all.

Page 1: Plone Radical Reskinning When one size doesn’t fit all.

Plone Radical Reskinning

When one size doesn’t fit all

Page 2: Plone Radical Reskinning When one size doesn’t fit all.

Plone ‘As-Is’ Use Case

Community siteMany content authorsPublic & edit faces similarCosts: Bulky pages Complex, expensive templates Hard to cache Design constrained by edit interface needs

Page 3: Plone Radical Reskinning When one size doesn’t fit all.

Split-Use Case

Public/Private needs different

Many viewers, few authors

Public & edit faces may differ

Benefits: Lighter, simpler public pages Public site may be aggressively cached More flexible design possible

Page 4: Plone Radical Reskinning When one size doesn’t fit all.

Public Homepage

Page 5: Plone Radical Reskinning When one size doesn’t fit all.

Public Interior Page

Page 6: Plone Radical Reskinning When one size doesn’t fit all.

“Edit” View

Page 7: Plone Radical Reskinning When one size doesn’t fit all.

Plone page in 36KB

Page 8: Plone Radical Reskinning When one size doesn’t fit all.

Access Rule

if context.REQUEST.BASE0.split('/')[2]. \ split('.')[0] \ not in ['edit','localhost:2080']: context.portal_url.getPortalObject(). \ changeSkin('public_skin')

Page 9: Plone Radical Reskinning When one size doesn’t fit all.

Standard Warning

WARNING: Access Rules are powerful, and can temporarily disable Zope access! Don't use them unless you have read all about them and know how to recover from mistakes!

Page 10: Plone Radical Reskinning When one size doesn’t fit all.

Access Rule Rescue

# Directive: suppress-all-access-rules## Description:# If this directive is set to on, no access rules in your Zope site# will be executed. This is useful if you "lock yourself out" of a# particular part of your site by setting an improper access rule.## Default: off## Example:## suppress-all-access-rules on

Page 11: Plone Radical Reskinning When one size doesn’t fit all.

Section Skinning Example #1

Page 12: Plone Radical Reskinning When one size doesn’t fit all.

Section Skinning #2

Page 13: Plone Radical Reskinning When one size doesn’t fit all.

Implementing Section Skin

<style type="text/css" tal:replace="structure here/section_css | nothing"></style>

From main template of public skin:

Page 14: Plone Radical Reskinning When one size doesn’t fit all.

Tailored Search