Each Presentation Template is implemented in the context of a specific content item. The Data Entry Template associated with the content item controls the names and types of any user-defined properties. All content items also have a set of system-defined properties (i.e., "name"). The names of system-defined and user-defined properties can be used in a Presentation Template to refer to the corresponding property values for the current content item.
The simplest property expression is the name of one of the properties in the content item being published.
<pcs:tag property="Headline">
IMPORTANT: The only characters treated as unique in a property name are alphabetic (a-z) and numeric (0-9). Alphabetic characters are NOT case-sensitive; uppercase and lowercase letters are equivalent. All other characters (punctuation, blanks) are replaced with an underscore ("_"). Angle brackets (<>) and ampersands (&) are not permitted. For example, all of the following tags are equivalent:
<pcs:tag property="jug_head">
<pcs:tag property="JUG HEAD">
<pcs:tag property="Jug+Head">
In more advanced uses, the property expression can be a dotted expression. Evaluating from left to right, each property to the left of a dot must evaluate to a content item or Content Server object that has a property with the name to the right of the dot. In the example below, "author" is a property in the current content item that refers to a content item with a property "bio", which refers to another content item with a property "hometown".
<pcs:tag property="author.bio.hometown">
For more details on expressions, see the next page, Using Expressions.
System-defined properties can be applied to the current content item or any Content Server object associated with the current content item. A property applies to the preceding value of the expression (to the left of the dot). If the property is not preceded by a dot, it applies to the current content item.
IMPORTANT: The property names listed in this section are used by Content Server. If you create a property with the same name, it will override the system-defined property. For example, creating a property named "location" will prevent the URL to that content item from being accessed using a Content Server expression. This could be desirable if the content item should redirect to another location.
The following properties are defined by the system:
Property |
Definition |
Valid For |
location |
An URL indicating where the Content Server object was or will be published, relative to the current content item. Useful for building links on a page. (This property is treated as text.) |
- content item |
created |
The date that the Content Server object was created. |
- content item |
createdBy |
The name of the user that created the Content Server object. |
- content item |
modified |
The date that the Content Server object was last modified. |
- content item |
modifiedBy |
The name of the user that last modified the Content Server object. |
- content item |
published |
The date that the Content Server object was last published. |
- content item |
publishedBy |
The name of the user that last published the Content Server object. |
- content item |
name |
The name of the Content Server object as it appears in Content Server Explorer. (This property is treated as text.) |
- content item |
pcs_id |
The unique identifier string assigned to the Content Server object by the system. As long as the object exists, the unique id will not change, even if the object is renamed or moved to a different folder. |
- content item |
pcs_path |
The full path to the Content Server object, within the folder hierarchy. The path starts with a "/", and each component of the path is separated from the next by another "/". Note: Special characters in names are not translated to underscores; if any component names contain a slash character, the result may be confusing. |
- content item |
height |
The vertical dimension, in pixels. (This property is treated as an integer.) |
- image property |
width |
The horizontal dimension, in pixels. (This property is treated as an integer.) |
- image property |
length |
The length of the object in units appropriate to the type of the object. |
Any expression that produces text (the result is the number of characters), or a list (the result is the number of values). |
folder |
The folder that contains the Content Server object. |
- content item |
item |
The current content item. This property can be used to access the current content item; without it there is no way to compare the current object with another item reference. Useful in expressions that test whether two item references are the same. |
- content item |
subfolders |
A list of subfolders. |
- folder |
You can also use property names in expressions, covered next.
Next: Using Expressions