Class TemplateAPI
Extends
ContentObjectAPI, TagContainerAPI.
Defined in: template.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
TemplateAPI.createTag(construct, magicValue, success, error)
Creates a tag of a given tagtype in this template.
|
<static> |
TemplateAPI.folder(success, error)
|
<static> |
TemplateAPI.remove(success, error)
|
<static> |
TemplateAPI.removeTag()
|
<static> |
TemplateAPI.removeTag(id, success, error)
Deletes the specified tag from this template.
|
<static> |
TemplateAPI.removeTags()
|
<static> |
TemplateAPI.removeTags(ids, success, error)
Deletes a set of tags from this template.
|
<static> |
TemplateAPI.save(success, error)
|
Method Detail
<static>
{TagAPI}
TemplateAPI.createTag(construct, magicValue, success, error)
Creates a tag of a given tagtype in this template.
Exmaple:
createTag('link', 'http://www.gentics.com', onSuccess, onError);or
createTag('link', onSuccess, onError);
- Parameters:
- {string} construct
- The name of the construct on which the tag to be created should be derived from.
- {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.
<static>
TemplateAPI.folder(success, error)
- Parameters:
- success
- error
<static>
TemplateAPI.remove(success, error)
- Parameters:
- success
- error
<static>
TemplateAPI.removeTag()
<static>
TemplateAPI.removeTag(id, success, error)
Deletes the specified tag from this template.
- Parameters:
- {string} id
- The id of the tag to be deleted.
- {function(TemplateAPI)=} success
- Optional callback that receive this object as its only argument.
- {function(GCNError):boolean=} error
- Optional custom error handler.
<static>
TemplateAPI.removeTags()
<static>
TemplateAPI.removeTags(ids, success, error)
Deletes a set of tags from this template.
- Parameters:
-
{Array.
} ids - The ids of the set of tags to be deleted.
- {function(TemplateAPI)=} success
- Optional callback that receive this object as its only argument.
- {function(GCNError):boolean=} error
- Optional custom error handler.
<static>
TemplateAPI.save(success, error)
- Parameters:
- success
- error