Class Index | File Index

Classes


Class PageAPI


Extends ContentObjectAPI, TagContainerAPI Page object information can be extended using the default REST-API. options: - update: true Whether the page should be locked in the backend when loading it. default: true - template: true Whether the template information should be embedded in the page object. default: true - folder: true, Whether the folder information should be embedded in the page object. default: true WARNING: do not turn this option off - it will leave the API in a broken state. - langvars: false, When the language variants shall be embedded in the page response. default: false - workflow: false, When the workflow information shall be embedded in the page response. default: false - pagevars: false, When the page variants shall be embedded in the page response. Page variants will contain folder information. default: false - translationstatus: false Will return information on the page's translation status. default: false.

Defined in: page.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
PageAPI.WRITEABLE_PROPS
Writable properties for the page object.
<static>  
Method Summary
Method Attributes Method Name and Description
<static>  
PageAPI.createTag(construct, success, error)
Creates a tag of a given tagtype in this page.
<static>  
PageAPI.preview(success, error)
<static>  
PageAPI.publish(success, error)
<static>  
PageAPI.removeTag()
<static>  
PageAPI.removeTags()
<static>  
PageAPI.takeOffline(success, error)
<static>  
PageAPI.template(success, error)
Get this page's template.
<static>  
PageAPI.unlock(success, error)
Class Detail
PageAPI()
Field Detail
<static> {Writable properties for the page object.} PageAPI.WRITEABLE_PROPS
Writable properties for the page object.

<static> {Constraints for writeable props} PageAPI.WRITEABLE_PROPS_CONSTRAINTS
Method Detail
<static> {TagAPI} PageAPI.createTag(construct, success, error)
Creates a tag of a given tagtype in this page. The first parameter should either be the construct keyword or ID, or an object containing exactly one of the following property sets:
  1. keyword to create a tag based on the construct with given keyword
  2. constructId to create a tag based on the construct with given ID
  3. sourcePageId and sourceTagname to create a tag as copy of the given tag from the page
Exmaple:
 createTag('link', onSuccess, onError);
or
 createTag({keyword: 'link', magicValue: 'http://www.gentics.com'}, onSuccess, onError);
or
 createTag({sourcePageId: 4711, sourceTagname: 'link'}, onSuccess, onError);
Parameters:
{string|number|object} construct
either the keyword of the construct, or the ID of the construct or an object with the following properties
  • keyword keyword of the construct
  • constructId ID of the construct
  • magicValue magic value to be filled into the tag
  • sourcePageId source page id
  • sourceTagname source tag name
{function(TagAPI)=} success
Optional callback that will receive the newly created tag as its only argument.
{function(GCNError):boolean=} error
Optional custom error handler.
Throws:
INVALID_ARGUMENTS
Returns:
{TagAPI} The newly created tag.

<static> PageAPI.preview(success, error)
Parameters:
success
error

<static> PageAPI.publish(success, error)
Parameters:
success
error

<static> PageAPI.removeTag()

<static> PageAPI.removeTags()

<static> PageAPI.takeOffline(success, error)
Parameters:
success
error

<static> {TemplateAPI} PageAPI.template(success, error)
Get this page's template.
Parameters:
{funtion(TemplateAPI)=} success
Optional callback to receive a TemplateAPI object as the only argument.
{function(GCNError):boolean=} error
Optional custom error handler.
Returns:
{TemplateAPI} This page's parent template.

<static> PageAPI.unlock(success, error)
Parameters:
success
error

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Nov 16 2012 16:59:12 GMT+0100 (CET)