Open source cms for mobile and desktop websites

nive_cms page and element functions

These functions are specific to cms applications and objects and extend the basic api.

Pages

This page contains a list of all functions supported by pages. The list is ordered by the different classes pages inherit their functionality from.

class nive_cms.baseobjects.PageBase(id, dbEntry, parent, configuration, **kw)

Page with content element support

  • stored in database
  • rendered as website page
  • handles sub pages
  • handles page columns
  • is an element container
  • supports paste of elements and pages
  • contained pages and elements are sortable

Interfaces: IPage, IPageContainer, IPageElementContainer, IContainer, IObject

class nive_cms.extensions.pages.PageColumns

Column support for pages.

Columns are always referenced by name and only one column for each name is created locally. Local means columns may be loaded from parent pages if not existing in this object.

Checks whether a column already exists before it is created.

GetColumn(name)

Returns the column name as object. If no local column is found, parents searched.

GetProxiedColumn(name)

Returns the column name as object. If no local column is found, parents searched.

HasLocalColumn(name)

Returns if a local column name exists.

LocalColumn(name)

Returns the local column name as object or None.

class nive_cms.extensions.pages.PageContainer

Extension for page containers. Adds sub page selection functionality.

GetPages(includeMenu=1, hidden=1, public=None, **kw)

Returns sub pages as objects based on parameters.

includeMenu = include pages marked as menus
hidden = include hidden pages
public = only published pages (pool_state=1). if none 
         queryRestraint default is used

returns object list

GetPagesList(includeMenu=1, hidden=1, public=None, fields=None)

Returns sub pages as objects based on parameters.

includeMenu = include pages marked as menus
hidden = include hidden pages
public = only published pages (pool_state=1). if none 
         queryRestraint default is used
fields = fields names included in result

returns object list

GetElementsList(fields=None)

Returns sub pages as objects based on parameters.

fields = fields names included in result

returns object list

class nive_cms.extensions.pages.PageElementContainer

Adds page element container functions to the object.

IsEmpty()

Check for empty page with no elements on it

returns True/False

GetPageElements(addBoxContents=0, addColumnContents=0, **kw)

List all contained elements.

addBoxContents = add elements contained in boxes
skipColumns = do not include columns
permission = check current users permissions for the page. requires request object.
request = used to look up security context
kw = passed to GetObjs() internally

returns a list of elements

AllowedPageElements(user, group=None)

Return a list of page element configurations allowed to be added in this container

GetElementContainer()

return the current element container

GetPage()

return the current page

IsColumn()

returns if the element is a column

IsPage()

returns if the element is a column

Page elements

This page contains a list of all functions supported by page elements. The list is ordered by the different classes pages inherit their functionality from.

This applies to thee following elements: file, image, link, media, menublock, news, note, spacer, text

class nive_cms.baseobjects.PageElementBase(id, dbEntry, parent, configuration, **kw)

Page element

  • stored in database
  • does not store subobjects
  • stored in element containers
  • cut, copy and paste support

Interfaces: INonContainer, IObject, IPageElement

class nive_cms.baseobjects.PageElementFileBase(id, dbEntry, parent, configuration, **kw)

Page element with file download support

  • stored in database
  • does not store subobjects
  • stored in element containers
  • cut, copy and paste support
  • contained files can be downloaded

Interfaces: INonContainer, IObject, IPageElement, IFile

class nive_cms.extensions.pages.PageElement

Adds page element functionality to objects.

Sets local acl ‘s based on object.meta.pool_group settings.

GetElementContainer()

Returns the current element container

GetPage()

Return the current page

TouchPage(user=None)

Changes the change date and time of the containing page to now

IsPage()

returns if the element is a column

Website Root

This page contains a list of all functions supported by roots. The list is ordered by the different classes roots inherit their functionality from.

class nive_cms.baseobjects.PageRootBase(path, app, rootDef)

Root with content element support

  • handles sub pages
  • handles page columns
  • rendered as website page
  • is an element container
  • supports paste of elements and pages
  • contained pages and elements are sortable

Interfaces: IPageContainer, IPageElementContainer, IContainer, IRoot

Extensions

These extensions are supported by default.

class nive_cms.cmsview.cutcopy.ContainerCopy

Cut, copy and paste functionality for object container

class nive_cms.cmsview.sort.Sort

Container sort functionality

Objects can explicitly be sorted and moved up or down in sequence. Sort values are stored in meta.pool_sort.

class nive_cms.extensions.path.AlternatePath

Enables readable url path names instead of ids for object traversal. Names are stored as meta.pool_filename and generated from title by default. Automatic generation can be disabled by setting meta.customfilename to False for each object.

Extensions like .html are not stored. Path matching works independent from extensions.

class nive_cms.extensions.fulltextpage.PageFulltext

Fulltext support for cms pages. Automatically updates fulltext on commit.

class nive_cms.cmsview.cutcopy.ObjCopy

Cut, copy and paste functionality for objects

© 2013 Nive GmbH