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

Post on 01-Apr-2015

213 views 1 download

Tags:

transcript

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

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

Public Homepage

Public Interior Page

“Edit” View

Plone page in 36KB

Access Rule

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

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!

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

Section Skinning Example #1

Section Skinning #2

Implementing Section Skin

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

From main template of public skin:

Tailored Search