SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Page

Methods for working with CMS pages

Functions

NameVisibilityDescription
activateRevisionpublic (static)Makes a particular revision live, and changes the status of the previous live revision to 'old'.
attrspublic (static)Returns an array of key-value pairs of all attributes for a page
determineNodeLinksprivate (static)Traverse page node to extract page links
determineRelatedLinkspublic (static)Return list of related links for given page
getContentWidgetspublic (static)Gets the embedded widgets (i.e. content blocks) for a page
getTextpublic (static)Get the page text for a page id, in HTML format, with widgets and everything, ready to go
injectPageSkinpublic (static)Inject page details -- title and browser title -- into a skin view
lastModifiedpublic (static)Return the last-modified date of the specified page.
loadPageMetapublic (static)Load page metadata - description and keywords
loadPageSocialpublic (static)Load page social - title, image, description, url
lookupUrlpublic (static)Get the page id for a given URL
pagesWithAttrpublic (static)Returns an array pages which contain a given attribute.
pagesWithWidgetpublic (static)Find pages with a given widget, and optionally the specified settings.
setupToolPagepublic (static)Set up metadata and social metadata for a tool page
toolUrlpublic (static)Fetches the URL for a tool page for a specific controller entrance method
urlpublic (static)Return the URL for a page, when given the page id

public activateRevision

void Page::activateRevision ( ID $rev_id );

Makes a particular revision live, and changes the status of the previous live revision to 'old'.
Should be run inside a transaction.

public attrs

unknown Page::attrs ( mixed $id );

Returns an array of key-value pairs of all attributes for a page

private determineNodeLinks

array Page::determineNodeLinks ( TreeNode $node , int $depth );

Traverse page node to extract page links

public determineRelatedLinks

array Page::determineRelatedLinks ( int $page_id );

Return list of related links for given page

public getContentWidgets

array Page::getContentWidgets ( int $rev_id , string $include );

Gets the embedded widgets (i.e. content blocks) for a page

public getText

string Page::getText ( int $page_id [, int $rev_id [, int $subsite_id ]] );

Get the page text for a page id, in HTML format, with widgets and everything, ready to go

public injectPageSkin

void Page::injectPageSkin ( View $skin , array $page );

Inject page details -- title and browser title -- into a skin view

public lastModified

null|string Page::lastModified ( [ int $page_id [, string $date_format ]] );

Return the last-modified date of the specified page.
Returns NULL on error.

If you don't provide a page-id, uses the id of the
Navigation::matchedNode()

The date is formatted using the php date function.
The default date format is "d/m/Y".

public loadPageMeta

void Page::loadPageMeta ( array $page );

Load page metadata - description and keywords

public loadPageSocial

void Page::loadPageSocial ( array $page [, Pagenode $node ] );

Load page social - title, image, description, url

public lookupUrl

unknown Page::lookupUrl ( mixed $url );

Get the page id for a given URL

public pagesWithAttr

array Page::pagesWithAttr ( string $attr_name [, string $attr_value ] );

Returns an array pages which contain a given attribute.

public pagesWithWidget

array Page::pagesWithWidget ( string $widget_name , array $settings );

Find pages with a given widget, and optionally the specified settings.
Only widgets on live revisions of active pages are checked.

public setupToolPage

null|array Page::setupToolPage ( );

Set up metadata and social metadata for a tool page

public toolUrl

string Page::toolUrl ( string|Controller $class , string $method );

Fetches the URL for a tool page for a specific controller entrance method

public url

string Page::url ( int $id );

Return the URL for a page, when given the page id
The URLs are relative