Methods for working with CMS pages
This is the code documentation for the SproutCMS project
Search documentation |
class PageMethods for working with CMS pages
Functions
public activateRevisionvoid 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 attrsunknown Page::attrs ( mixed $id ); Returns an array of key-value pairs of all attributes for a page private determineNodeLinksarray Page::determineNodeLinks ( TreeNode $node , int $depth ); Traverse page node to extract page links public determineRelatedLinksarray Page::determineRelatedLinks ( int $page_id ); Return list of related links for given page public getContentWidgetsarray Page::getContentWidgets ( int $rev_id , string $include ); Gets the embedded widgets (i.e. content blocks) for a page public getTextstring 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 injectPageSkinvoid Page::injectPageSkin ( View $skin , array $page ); Inject page details -- title and browser title -- into a skin view public lastModifiednull|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 loadPageMetavoid Page::loadPageMeta ( array $page ); Load page metadata - description and keywords public loadPageSocialvoid Page::loadPageSocial ( array $page [, Pagenode $node ] ); Load page social - title, image, description, url public lookupUrlunknown Page::lookupUrl ( mixed $url ); Get the page id for a given URL public pagesWithAttrarray Page::pagesWithAttr ( string $attr_name [, string $attr_value ] ); Returns an array pages which contain a given attribute. public pagesWithWidgetarray 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 setupToolPagenull|array Page::setupToolPage ( ); Set up metadata and social metadata for a tool page public toolUrlstring Page::toolUrl ( string|Controller $class , string $method ); Fetches the URL for a tool page for a specific controller entrance method public urlstring Page::url ( int $id ); Return the URL for a page, when given the page id The URLs are relative |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |