You are here:   » Home » Documentation » Details » How-To » DTML/Products » Home

Recursively changing text formats

Author: Dr. Frank Hoffmann, 2005/06/08

The image legend has not been equipped with text format planned for it. Therefore the attribute 'format' of the ZMS standard object 'ZMS-Graphic' shall newly be set generalized (or from a certain node on).

Solution: A DTML method on template level gets in the targeted node with the API function 'filteredTreeNodes() ', determines the (exceptionally always monolingual) value of format, sets the value new with setObjProperty() and saves this one with onChangeObj(REQUEST). At last this exemplary method delivers an orientating protocol.

Zoom (88KB)

DTML method for manipulating object attributes

Zoom (88KB)

DTML method for manipulating object attributes

<html>
<body>
<dtml-with "content.e232.e233">
<dtml-var f_standard_html_request>
<dtml-in "filteredTreeNodes(REQUEST,'ZMSGraphic')">
<dtml-call "REQUEST.set('f',getObjProperty('format',REQUEST))">
<dtml-if f>
  Format: '<dtml-var f>'
  <dtml-call "setObjStateModified(REQUEST)">
  <dtml-call "setObjProperty('format','caption',lang)">
  <dtml-call "onChangeObj(REQUEST)">
  <i>changed to</i>: 'caption'<br />
</dtml-if>
</dtml-in>
</dtml-with>
</body>
</html>