| 1 |
from AccessControl import ClassSecurityInfo |
|---|
| 2 |
|
|---|
| 3 |
from Products.Archetypes.public import Schema |
|---|
| 4 |
|
|---|
| 5 |
from Products.qSiloGroup.config import PROJECTNAME |
|---|
| 6 |
from Products.ATContentTypes.content.base import registerATCT |
|---|
| 7 |
from Products.ATContentTypes.content.base import ATCTContent |
|---|
| 8 |
from Products.ATContentTypes.content.schemata import ATContentTypeSchema |
|---|
| 9 |
from Products.ATContentTypes.content.schemata import finalizeATCTSchema |
|---|
| 10 |
from Products.ATContentTypes.lib.historyaware import HistoryAwareMixin |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
SiloSiteMapSchema = ATContentTypeSchema.copy() |
|---|
| 14 |
SiloSiteMapSchema['id'].default = 'sitemap.htm' |
|---|
| 15 |
SiloSiteMapSchema['id'].default_method = 'getDefaultId' |
|---|
| 16 |
SiloSiteMapSchema['title'].default_method = 'getDefaultTitle' |
|---|
| 17 |
SiloSiteMapSchema['allowDiscussion'].schemata = 'metadata' |
|---|
| 18 |
SiloSiteMapSchema['relatedItems'].schemata = 'metadata' |
|---|
| 19 |
SiloSiteMapSchema['description'].schemata = 'metadata' |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
class 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 |
|
|---|
| 48 |
registerATCT(SiloSiteMap, PROJECTNAME) |
|---|