# Path: nive_cms/i18n.py

# 
# Path: nive_cms/baseobjects.py
# class PageElementContainerBase(Sort, ContainerCopy, PageElementContainer, ObjectContainerBase):
#     """
#     *Element container*
#     
#     - stored in database
#     - handles page elements
#     - supports paste of elements and pages
#     - contained pages and elements are sortable 
# 
#     Interfaces: ``IContainer, IObject, IPageElement, IPageElementContainer``
#     """
#     implements(IPageElement, IPageElementContainer)


from nive_cms.i18n import _
from nive.definitions import StagPage, StagPageElement, ObjectConf, FieldConf, IColumn, implements
from nive_cms.baseobjects import PageElementContainerBase

    def GetElementContainer(self):
        return self 

    def GetContainer(self):
        return self.parent

    def GetColumn(self, name):
        if name == self.meta["title"]:
            return self
        return self.GetPage().GetColumn(name)


# type definition ------------------------------------------------------------------
#@nive_module
configuration =  ObjectConf(
    id = "column",
    name = _(u"Column"),
    dbparam = "columnbox",
    context = "nive_cms.column.column",
    template = "column.pt",
    hidden = True,
    selectTag = StagPageElement,
    container = True,
    icon = "nive_cms.cmsview:static/images/types/column.png",
    description = _(u"A column is a container to group elements on a page. Columns are not added like"
                    u"normal page elements but have to be defined manually in the main template. A column can"
                    u"be inherited through a hierarchy of pages.")
)
configuration.data = [

# Path: nive_cms/i18n.py

# 
# Path: nive_cms/baseobjects.py
# class PageElementContainerBase(Sort, ContainerCopy, PageElementContainer, ObjectContainerBase):
#     """
#     *Element container*
#     
#     - stored in database
#     - handles page elements
#     - supports paste of elements and pages
#     - contained pages and elements are sortable 
# 
#     Interfaces: ``IContainer, IObject, IPageElement, IPageElementContainer``
#     """
#     implements(IPageElement, IPageElementContainer)


# Path: nive_cms/column.py
from nive_cms.i18n import _
from nive.definitions import StagPage, StagPageElement, ObjectConf, FieldConf, IColumn, implements
from nive_cms.baseobjects import PageElementContainerBase


    def GetElementContainer(self):
        return self 

    def GetContainer(self):
        return self.parent

    def GetColumn(self, name):
        if name == self.meta["title"]:
            return self
        return self.GetPage().GetColumn(name)


# type definition ------------------------------------------------------------------
#@nive_module
configuration =  ObjectConf(
    id = "column",
    name = _(u"Column"),
    dbparam = "columnbox",
    context = "nive_cms.column.column",
    template = "column.pt",
    hidden = True,
    selectTag = StagPageElement,
    container = True,
    icon = "nive_cms.cmsview:static/images/types/column.png",
    description = _(u"A column is a container to group elements on a page. Columns are not added like"
                    u"normal page elements but have to be defined manually in the main template. A column can"
                    u"be inherited through a hierarchy of pages.")
)
configuration.data = [

    FieldConf(id="showsub", datatype="bool", size=2, default=1, name=_(u"Show on subpages"), description=_(u"If checked the column will be displayed on sub pages until overwritten."))