Class PageAPI
Extends
ContentObjectAPI, TagContainerAPI
Page object information can be extened 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.
Constructor Attributes | Constructor Name and Description |
---|---|
PageAPI()
|
Field Attributes | Field Name and Description |
---|---|
<static> |
PageAPI.WRITEABLE_PROPS
|
Method Attributes | Method Name and Description |
---|---|
<static> |
PageAPI.createTag(construct, magicValue, 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)
|
createTag('link', 'http://www.gentics.com', onSuccess, onError);or
createTag('link', onSuccess, onError);
- Parameters:
- {string|number} construct
- The name of the construct on which the tag to be created should be derived from. Or the id of that
- {string=} magicValue
- Optional property that will override the default values of this tag type.
- {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.
- Parameters:
- success
- error
- Parameters:
- success
- error
- Parameters:
- success
- error
- 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.
- Parameters:
- success
- error