Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalThemesTool::PortalThemesTool::addPortalTheme (   self,
  empty = 0,
  kw 
)

Creates a new Portal Theme. Returns the theme's id.
    If 'empty' is set to 1, the theme will be empty,
    otherwise a minimal theme will be created.

Definition at line 934 of file PortalThemesTool.py.

00934                                            :
        """ Creates a new Portal Theme. Returns the theme's id.
            If 'empty' is set to 1, the theme will be empty,
            otherwise a minimal theme will be created.
        """

        id = kw.get('id', 'PortalTheme')
        new_id = getFreeId(self, try_id=id)
        cpsskins = self.manage_addProduct['CPSSkins']
        cpsskins.manage_addContent(id=new_id, type='Portal Theme')
        theme = getattr(self, new_id, None)
        theme.createThemeSkeleton()

        if empty:
            return theme
        themepage = theme.addThemePage()
        pageblock = themepage.addPageBlock()
        if pageblock is not None:
            maincontent = pageblock.addContent(type_name='Main Content Templet')
            maincontent.edit(xpos=int(1))
        pageblock.edit(maxcols=int(3))
        col1 = pageblock.addCellSizer(xpos=int(0))
        col2 = pageblock.addCellSizer(xpos=int(1))
        col3 = pageblock.addCellSizer(xpos=int(2))
        col1.edit(cellwidth='20%')
        col2.edit(cellwidth='60%')
        col3.edit(cellwidth='20%')
        return theme

    security.declarePublic('getTranslationService')
    def getTranslationService(self, root=0, cat=''):


Generated by  Doxygen 1.6.0   Back to index