rendered paste bodyship/skin/standardmacros.py: 1 from zope.publisher.browser import BrowserView 2 from zope.app.pagetemplate import ViewPageTemplateFile 3 from zope.app.basicskin.standardmacros import StandardMacros as BaseMacros 4 5 class ShipDevMacros(BrowserView): 6 template = ViewPageTemplateFile('macros/ShipDev.pt') 7 8 def __getitem__(self,key): 9 return self.template.macros[key] 10 11 class StandardMacros(BaseMacros): 12 macro_pages = ('shipDev_macros', None)ship/skin/configure.zcml: 1 <configure 2 xmlns="http://namespaces.zope.org/zope" 3 xmlns:browser="http://namespaces.zope.org/browser" 4 > 5 6 <interface 7 interface=".interfaces.IShipSkin" 8 type="zope.publisher.interfaces.browser.IBrowserSkinType" 9 name="ShipDev" /> 10 11 <browser:view 12 for="*" 13 name="shipDev_macros" 14 class=".standardmacros.ShipDevMacros" 15 permission="zope.View" 16 layer=".interfaces.IShipSkin" 17 /> 18 19 <browser:view 20 for="*" 21 name="standard_macros" 22 class=".standardmacros.StandardMacros" 23 permission="zope.View" 24 allowed_interface="zope.interface.common.mapping.IItemMapping" 25 layer=".interfaces.IShipSkin" 26 /> 27 28 <browser:resourceDirectory 29 name="ShipDev" 30 directory="ShipDev" 31 layer=".interfaces.IShipSkin" 32 /> 33 34 </configure>ship/skin/macros/ShipDev.pt: 1 <html xmlns="http://www.w3.org/1999/xhtml" 2 xmlns:tal="http://xml.zope.org/namespaces/tal" 3 xmlns:metal="http://xml.zope.org/namespaces/metal" 4 metal:define-macro="page"> 5 6 <head> 7 <title metal:define-slot="title">Ship Version 2</title> 8 <link rel="stylesheet" type="text/css" href=shipdev.css" 9 tal:attributes="href context/++resource++ShipDev/shipDev.css" /> 10 <metal:slot define-slot="headers" /> 11 </head> 12 13 <body> 14 <div id="logo"> 15 <img src="ShipDevBanner.gif" alt="Ship Development" 16 tal:attributes="src context/++resource++ShipDev/ShipDevBanner.gif" /> 17 </div> 18 19 <div id="content"> 20 <metal:slot define-slot="body"> 21 The Body of the site goes here. 22 </metal:slot> 23 </div> 24 </body> 25 </html>