ZMSObject is the abstract basic class from which all ZMS-objects derived.
ZMSObject.declHref2IndexHtml(REQUEST)
BESCHREIBUNG:
For the current object gives back a declarative hyperlink to the HTML-index page (e.g. http://www.myzms.com/content/products/service) in consideration of the language .
EINGABE-PARAMETER:
REQUEST: the Http-Request Object
AUSGABE-PARAMETER:
URL[string]: Hyperlink to the HTML-Index-page
| [1] |
Speaking Link to the HTML-Indexpage:
<a href="<dtml-var "declHref2IndexHtml(REQUEST)">"> <dtml-var "getTitlealt(REQUEST)"> </a> |
ZMSObject.findFilteredTreeNodes(REQUEST, meta_types, values=[])
BESCHREIBUNG:
For the current object searchs through the complete sub-tree after objects of the specified meta-type that are congruent with the stated value list.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
meta_types[string|list]: Meta type of sub-objects; it can be a list of meta_types or a key word PAGES or PAGEELEMENTS; it can the meta_id of a special object also.
values[list]: list of values; key and value follow always
AUSGABE-PARAMETER:
nodes[list]: List of objects
ZMSObject.getBodyContent(REQUEST)
BESCHREIBUNG:
Generates the HTML-presentation of the ZMS-object in the body text. In case that DTML-commands exist those are carried out, too.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
AUSGABE-PARAMETER:
html[string]: the HTML-display of the ZMS-Object
| [1] |
Displays all page elements of the current document:
<dtml-in "filteredChildNodes(REQUEST,PAGEELEMENTS)"> <dtml-var "getBodyContent(REQUEST)"> </dtml-in> |
ZMSObject.getChildNodes(REQUEST, meta_types=None)
BESCHREIBUNG:
For the current object gives back a sorted list of all sub-objects of the specified meta-type.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
meta_types[string|list]: Meta-type of the sub-objects (optional); this can be a list of meta_types or one of the keywords PAGES or PAGEELEMENTS.
AUSGABE-PARAMETER:
nodes[list]: List of objects
| [1] |
List all sub-objects of the current object:
getChildNodes(REQUEST) |
| [2] |
List all sub-objects of type ZMSTextarea or ZMSDocument of the current object:
getChildNodes(REQUEST,['ZMSTextarea','ZMSDocument']) |
| [3] |
List all sub-objects of type PAGE (ZMSFolder, ZMSDocument, etc.) of the current object:
getChildNodes(REQUEST,PAGES) |
| [4] |
Comma-separated list of the IDs of all sub-objects of type PAGE:
<dtml-in "getChildNodes(REQUEST,PAGES)"> <dtml-var id> <dtml-unless sequence-end>,</dtml-unless> </dtml-in> |
ZMSObject.getDocumentElement()
BESCHREIBUNG:
Gives back the root element of the tree.
AUSGABE-PARAMETER:
node[ZMSObject]
| [1] |
Displays the title of the root element:
<dtml-var "getDocumentElement().getTitle(REQUEST)"> |
ZMSObject.getHome()
BESCHREIBUNG:
Gives back the home-folder of the content-object.
AUSGABE-PARAMETER:
node[Folder]
| [1] |
Displays the ID of the home-folder:
<dtml-var "getHome().id"> |
ZMSObject.getHref2IndexHtml(REQUEST, deep=1)
BESCHREIBUNG:
For the current object gives back the hyperlink to the the first found HTML-index page in consideration of the language (e.g. http://www.myzms.com/content/e4/e16/index_ger.html). Via the flag deep the navigation is forced in the depth of the first HTML-page that is not empty. An HTML-page is not empty when containing displayable elements (text sections, images).
EINGABE-PARAMETER:
REQUEST: the Http-Request Object
deep[int]: Navigation into the depth of the first not empty HTML-page
AUSGABE-PARAMETER:
URL[string]: Hyperlink to the HTML-Index-page
| [1] |
Link to the first found HTML-Index-page in the content tree:
<a href="<dtml-var "getHref2IndexHtml(REQUEST)">"> <dtml-var "getTitlealt(REQUEST)"> </a> |
ZMSObject.getHref2PrintHtml(REQUEST)
BESCHREIBUNG:
For the current object gives back the hyperlink to the first found HTML-page of the print version (e.g. http://www.myzms.com/content/e4/e16/sitemap_ger.html) in the sub-tree.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object
AUSGABE-PARAMETER:
URL[string]: Hyperlink to the HTML-page of the print version
| [1] |
Link to the first found HTML-print version in the content tree:
<a href="<dtml-var "getHref2PrintHtml(REQUEST)">"
target="_blank">
Druckversion
</a>
|
ZMSObject.getHref2SitemapHtml(REQUEST)
BESCHREIBUNG:
For the current object gives back the hyperlink to the first found HTML-page of the site-map (e.g. http://www.myzms.com/content/e4/e16/sitemap_ger.html) in the sub-tree.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object
AUSGABE-PARAMETER:
URL[string]: Hyperlink to the HTML-page of the site-map
| [1] |
Link to the first found HTML-Site-map page in the sub-tree:
<a href="<dtml-var "getHref2SitemapHtml(REQUEST)">"> Sitemap </a> |
ZMSObject.getLevel()
BESCHREIBUNG:
Gives back the hierarchy-level of the current object.
AUSGABE-PARAMETER:
level[int]: Hierarchy-level
| [1] |
Outputs the ID of an object of the 1. hierarchy-level only:
<dtml-if "getLevel()==1">
<dtml-var id>
</dtml-if>
|
ZMSObject.getObjInput(key, REQUEST)
BESCHREIBUNG:
For the current object delivers an input field (text input single-/multiline, date, selective list, etc.) to the stated attribute key.
Ca be used to write own HTML-input forms beyond the ZMS Management Interface.
EINGABE-PARAMETER:
key[string]: the key of the attribute
REQUEST: the Http-Request Object.
AUSGABE-PARAMETER:
html[string]: the HTML-display of the input field
ZMSObject.getObjProperty(key, REQUEST)
BESCHREIBUNG:
For the current object delivers the value of an attribute to the stated key key. Thereby the context implicated by the request-object REQUEST is considered (language, live-/workversion).
EINGABE-PARAMETER:
key[string]: der key of the attribute
REQUEST: the Http-Request Object.
AUSGABE-PARAMETER:
value[any]: der value of the attribute
| [1] |
Outputs the title of the current object:
<dtml-var "getObjProperty('title',REQUEST)">
|
ZMSObject.getParentByLevel(level)
BESCHREIBUNG:
Delievers the element superior to the current object at the stated hierarchy-level of the tree or itself in case that the current object already is located above the stated hierarchy-level.
EINGABE-PARAMETER:
level[int]: the hierarchy-level of the superior element
AUSGABE-PARAMETER:
node[ZMSObject]
ZMSObject.getParentNode()
BESCHREIBUNG:
Deleivers the element of the tree superior to the current object, None in case that the current object already is the root element.
AUSGABE-PARAMETER:
node[ZMSObject]
ZMSObject.isActive(REQUEST)
BESCHREIBUNG:
Gives back 1 in case that the current object is visible, otherwise 0.
An object is active if:
- the active-toggle is activated.
- the current date lies within the activation time frame (if existing).
EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
AUSGABE-PARAMETER:
active[int]: 1 in case that the current object is active, otherwise 0.
| [1] |
Outputs the ID of an object if active:
<dtml-if "isActive(REQUEST)"> <dtml-var id> </dtml-if> |
| [2] |
Outputs the ID of an object if inactive:
<dtml-unless "isActive(REQUEST)"> <dtml-var id> </dtml-unless> |
ZMSObject.isPage()
BESCHREIBUNG:
Gives back 1 in case that the current object corresponds to an own HTML-page, otherwise 0.
E.g. a folder or a document corresponds to an own page, but a text section or an image does not.
AUSGABE-PARAMETER:
page[int]: 1 if the current object corresponds to an own page, otherwise 0.
| [1] |
Creates a link to an object if it is an own page:
<dtml-if "isPage()"> <a href="<dtml-var "getHref2IndexHtml(REQUEST)">"> <dtml-var "getTitlealt(REQUEST)"> </a> </dtml-if> |
|||||||||||||||||||||||||||||||||||||||||||||
| [2] |
|
ZMSObject.isPageElement()
BESCHREIBUNG:
Gives back 1 in case that the current object corresponds to an HTML-page element displayable in a body text, otherwise 0.
E.g. a text section or an image corresponds to a displayable page element, but a folder, a link collection or a note does not.
AUSGABE-PARAMETER:
page element[int]: 1 if the current object corresponds to a displayable page element, otherwise 0.
| [1] |
Presents an object if it is a displayable page element:
<dtml-if "isPageElement()"> <dtml-var "getBodyContent(REQUEST)"> </dtml-if> |
|||||||||||||||||||||||||||||||||||||||||||||
| [2] |
|
ZMSObject.isResource(REQUEST)
BESCHREIBUNG:
Gives back 1 in case that the current object is of type (DC.Type) Resource, otherwise 0.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
AUSGABE-PARAMETER:
resource[int]: 1 if he current object is of type (DC.Type) Resource, otherwise 0.
| [1] |
Outputs the meta-attribute DC.Type of an object in case that it is not of type (DC.Type) Resource:
<dtml-unless "isResource(REQUEST)">
<dtml-var "getObjProperty('attr_dc_type',REQUEST)">
</dtml-unless>
|
ZMSObject.isTranslated(lang, REQUEST)
BESCHREIBUNG:
Checks whether the current object has been translated to the stated language.
EINGABE-PARAMETER:
lang[string]: the language
REQUEST: the http request object
AUSGABE-PARAMETER:
translated[int]: 1 if the current object is visible, else 0.
| [1] |
DTML-Template for the language selection:
<form name="fmLangSelect">
<select size="1"
onchange="location.href=this.options[this.selectedIndex].value;">
<dtml-in "getLanguages()">
<dtml-let req="{'lang':_['sequence-item'],
'preview':REQUEST.get('preview','')}">
<dtml-if "isActive(req) and
isTranslated(req['lang'],REQUEST)">
<option value="<dtml-var "getHref2IndexHtml(req)">"
<dtml-if "lang==req['lang']">
<selected="selected"
</dtml-if>
><dtml-var "getLanguageLabel(req['lang'])"></option>
</dtml-if>
</dtml-let>
</dtml-in>
</select>
</form>
|
ZMSObject.isVisible(REQUEST)
BESCHREIBUNG:
Checks whether the current object is visible. An object is visible if:
- it is active.
- it has already been released with activated workflow.
- the coverage (DC.Coverage) is an element out of obligation, proposal or the current local language.
EINGABE-PARAMETER:
REQUEST: the Http-Request Object.
AUSGABE-PARAMETER:
visible[int]: 1 if the current object is visible, otherwise 0.
| [1] |
Outputs the ID of an object if visible:
<dtml-if "isVisible(REQUEST)"> <dtml-var id> </dtml-if> |
| [2] |
Outputs the ID of an object if invisible:
<dtml-unless "isVisible(REQUEST)"> <dtml-var id> </dtml-unless> |
ZMSObject.setObjProperty(key, value, lang)
BESCHREIBUNG:
For the current object sets an attribute to the stated key key in the language lang on the stated value value.
EINGABE-PARAMETER:
key[string]: the key of the attribute
value[any]: the new value of the attribute
lang[string]: the language
| [1] |
Puts the title of the current object to New Title:
<dtml-call "setObjStateModified(REQUEST)">
<dtml-call "setObjProperty('title','Neuer Titel',lang)">
<dtml-call "onChangeObj(REQUEST)">
|