Template Engine language reference > Composition Center interface > Document definition functions > propertyNameArray()

propertyNameArray()
This document definition function returns an array of all property names in a document definition, section or resource. Depending on the context, use the following syntax:
$docdef.propertyNameArray()
$docdef.<sectionName>.propertyNameArray()
$docdef.<sectionName>.<resourceName>.propertyNameArray()
To get the value of a property you must use the propertyValue() function. See propertyValue().
Example 62
Template
#foreach($propName in $docdef.propertyNameArray())
$propName
#end
Output
spaceafter
spaceafter.unit
spacebefore.unit
leftindent
leftindent.unit
spacebefore
 
Example 63
Template
#foreach($propName in $docdef.section1.propertyNameArray())
$propName
#end
Output
spaceafter
spaceafter.unit
spacebefore.unit
leftindent
leftindent.unit
spacebefore
id
displayName
 
Example 64
Template
#foreach($propName in $docdef.section1.{Text A}.propertyNameArray())
$propName
#end
Output
spaceafter
spaceafter.unit
spacebefore.unit
leftindent
leftindent.unit
spacebefore
id
ruleId
displayName
name
description
uri
 
Example 65
Template
#foreach($j in $docdef.section1.resourceArray())
Resource: $j.name()
#foreach($propName in $j.propertyNameArray())
$propName
#end
#end
Output
Resource: Text A
spaceafter
spaceafter.unit
spacebefore.unit
leftindent
...
Resource: Image 1
spaceafter
...
 
OpenText StreamServe 5.6.2 Updated: 2018-01-26