Article
Basic article handling that enables functionality as clearing and creating new copies of a newsitem article
clear(disableWarning)
Clear the article and create a new based on the configured base template.
Parameters
copy(name)
Attempt to execute copy hooks if at least one exists, then create a new, unsaved, article based on the current article.
Parameters
setSourceArticle(sourceArticleUuid)
Remove any itemMeta links with rel "source", and add a new itemMeta link with rel "source" using supplied article uuid
Parameters
setPubStatus(data)
Sets the publication status for this document. The value is one of what is defined in the NewsML G2 standard: https://www.iptc.org/std/NewsML-G2/latest/QuickStart-NewsML-G2-ItemBasics under the Publication Status section, together with custom extension in the format [customExtensionPrefix]:[customValue], such as imext:draft
Parameters
Example
~~addService(data) ~~
Deprecated
Adds a service to the itemMeta section of the article. The service tag concists of a mandatory 'qcode' value and an optional 'why' attribute with extra information.
Parameters
Example
removeService(data)
Removes a service from the itemMeta section of the article.
Parameters
Example
setPubStart(data)
Sets the publish start time, using ISO_8601 standard. If value is null, pubStart will be unset.
Parameters
Example
setPubStop(data)
Sets the publish stop time, using ISO_8601 standard.
Parameters
Example
setTitle(data)
Sets the value of the title.
Parameters
Example
setEdNote(data)
Sets the value of editor note
Parameters
Example
setItemMetaExtProperty(data)
Sets the value of a property. If value is null, the property will be removed. The type of property to change is specified by the type argument.
The type is defined by the [customPrefix]:[type] syntax, such as imext:url
Parameters
Example
addItemMetaLink(data)
Adds a link to the itemMeta section of the article.
Parameters
Example
removeItemMetaLink(data)
Removes a link from itemMeta section
Parameters
Example
~~setAltId(data) ~~
Deprecated
Sets the alternative ID for the article. If null, the element will be removed.
Parameters
Example
~~setSlugline(data) ~~
Deprecated
Sets the slugline for the article. If null, the element will be removed.
Parameters
Example
~~setDescription(data) ~~
Deprecated
Sets the description of the article. If null, the element will be removed.
Parameters
Example
~~setBy(data) ~~
Deprecated
Sets the byline for the article. If null, the element will be removed.
Parameters
Example
~~setHeadline(data) ~~
Deprecated
Sets the headline of the article. If null, the element will be removed.
Parameters
Example
~~addContentMetaLink(data) ~~
Deprecated
Adds a link to the contentMeta section of the article.
Parameters
Example
~~removeContentMetaLink(data) ~~
Deprecated
Removes a link from contentMeta section
Parameters
Example
~~addContentMetadata(data) ~~
Deprecated
Adds an object element to the metadata section in contentMeta
Parameters
Example
~~removeContentMetadata(data) ~~
Deprecated
Removes an object in the contentMeta metadata section of the article.
Parameters
Example
itemMeta(path) ⇒ DocumentNode
DocumentNode
Returns the itemMeta node
Returns: DocumentNode
- A node instance
Throws:
Error when node does not exist
Parameters
contentMeta(path) ⇒ DocumentNode
DocumentNode
Returns the contentMeta node
Returns: DocumentNode
- A node instance
Throws:
Error when node does not exist
Parameters
Last updated