The <cms:property>
tag
This tag provides access to read the OpenCms properties of the current file or its parent folders as configured in the "Properties" context dialog of the OpenCms explorer view.
Attributes:
Name | Description | Required |
name | The name of the property to read. Common properties are for example "Title", "cache", "NavText" etc. If the selected property was not found null is returned. | yes |
file | This attribute allows you to specify where to search for the property.
| no |
Body:
This tag has no body content!
Example usage:
Read the "Title" property of the current file:
<cms:property name="Title" />
... this is the same as using:
<cms:property name="Title" file="uri" />
Try to read the "locale" property of the current file, and if not found there, check all parent folders:
<cms:property name="Title" file="search" />
... this is the same as using:
<cms:property name="Title" file="search.uri" />
Read the "Title" property of the file "/index.html":
<cms:property name="Title" file="/index.html" />