Personal tools
You are here: Home Weblog Archive 2006 October 24 How to define a new skin in Zope 3
Document Actions
  • Send this page to somebody
  • Print this page
  • Add Bookmarklet

How to define a new skin in Zope 3

by tibi last modified 2006-10-24 13:34
Filed Under:

Lifted from zope.app.rotterdam

  • Create a new browser skin layer
from zope.publisher.interfaces.browser import IBrowserRequest
from zope.publisher.interfaces.browser import IDefaultBrowserLayer

class rotterdam(IBrowserRequest):
"""Layer for registering Rotterdam-specific macros."""

class Rotterdam(rotterdam, IDefaultBrowserLayer):
"""The ``Rotterdam`` skin.

It is available via ``++skin++Rotterdam``.
"""
  • Register the skin in configure.zcml
<interface
interface="zope.app.rotterdam.Rotterdam"
type="zope.publisher.interfaces.browser.IBrowserSkinType"
name="Rotterdam"
/>

Declaring a resource and a page for the skin

 <browser:resource
name="zope3.css"
file="zope3.css"
layer="zope.app.rotterdam.rotterdam" />

<browser:page
for="*"
name="standard_macros"
permission="zope.View"
class=".standardmacros.StandardMacros"
layer="zope.app.rotterdam.rotterdam"
allowed_interface="zope.interface.common.mapping.IItemMapping"
/>
Weblog
Atom
RDF
RSS 2.0
Powered by Quills
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: