• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 30. Local Utilities > Step 3: Registering the Themes

Step 3: Registering the Themes

You need to register the local theme as a new content type and local utility. Making it a local utility will also ensure that it can be added only to site management folders. You need to add the following directives to your configuration file:

01 <zope:content class=".localtheme.SmileyTheme">  
02   <zope:factory
03       id="book.smileyutility.SmileyTheme"
04       title="Smiley Theme"
05       description="A Smiley Theme"
06       />
07   <zope:implements
08       interface="zope.app.utility.interfaces.ILocalUtility" 
09       />
10   <zope:implements
11       interface="zope.app.container.interfaces.IContentContainer" 
12       />
13   <zope:implements
14       interface="zope.app.annotation.interfaces.IAttributeAnnotatable" 
15       />
16   <zope:allow
17       interface="zope.app.container.interfaces.IReadContainer"
18       />
19   <zope:require
20       permission="zope.ManageServices"
21       interface="zope.app.container.interfaces.IWriteContainer"
22       />
23   <zope:allow
24       interface=".interfaces.ISmileyTheme"
25       />
26 </zope:content>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint