source: products/qSiloGroup/tags/0.1.3/SiloSiteMap.py @ 1

Last change on this file since 1 was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1from AccessControl import ClassSecurityInfo
2
3from Products.Archetypes.public import Schema
4
5from Products.qSiloGroup.config import PROJECTNAME
6from Products.ATContentTypes.content.base import registerATCT
7from Products.ATContentTypes.content.base import ATCTContent
8from Products.ATContentTypes.content.schemata import ATContentTypeSchema
9from Products.ATContentTypes.content.schemata import finalizeATCTSchema
10from Products.ATContentTypes.lib.historyaware import HistoryAwareMixin
11
12
13SiloSiteMapSchema = ATContentTypeSchema.copy()
14SiloSiteMapSchema['id'].default = 'sitemap.htm'
15SiloSiteMapSchema['id'].default_method = 'getDefaultId'
16SiloSiteMapSchema['title'].default_method = 'getDefaultTitle'
17SiloSiteMapSchema['allowDiscussion'].schemata = 'metadata'
18SiloSiteMapSchema['relatedItems'].schemata = 'metadata'
19SiloSiteMapSchema['description'].schemata = 'metadata'
20
21
22class SiloSiteMap(ATCTContent, HistoryAwareMixin):
23    """ Silo Site Map """
24
25    schema         =  SiloSiteMapSchema
26
27    content_icon   = 'document_icon.gif'
28    meta_type      = 'SiloSiteMap'
29    portal_type    = 'SiloSiteMap'
30    archetype_name = 'Silo Sitemap'
31    default_view   = 'silositemap_view'
32    immediate_view = 'silositemap_view'
33    suppl_views    = ()
34    typeDescription= 'Silo Sitemap'
35    typeDescMsgId  = 'description_edit_document'
36
37    security       = ClassSecurityInfo()
38
39    def getDefaultTitle(self):
40        """  Buid default title """
41        return  self.aq_parent.Title() + ' Sitemap'
42
43    def getDefaultId(self):
44        """         """
45        return 'sitemap.htm'
46
47
48registerATCT(SiloSiteMap, PROJECTNAME)
Note: See TracBrowser for help on using the repository browser.