Documentation Center

Component variable

The Component variable refers to a single Component. In a Compound Component Template, it denotes the Component being processed by the Template. In a Compound Page Template, you can use the variable within a repeating region (Components or a named subset of Components) to refer to any Component in the set.

Component has the following subvariables:

Component.Title or Component.Name
the name of this Component as specified in Content Manager
Component.ID
the Content Manager URI (unique identifier) of this Component
Component.<FieldName>
the value of a data or metadata field of this Component called <FieldName> (if both exist, the value chosen is the data field).
Component.Fields.<FieldName>
the value of a data field of the Component called <FieldName> (only use this construction if you have a data field called Title, Name or ID).
Component.Fields.<EmbeddedSchemaName>.<EmbeddedFieldName>
the value of a field that is part of an Embedded Schema contained in the Component. For example, if the Component is based on a Schema called Personal Data that has an Address field of type "Embedded Schema", you can access the StreetName field of that Embedded Schema by writing Component.Fields.Address.StreetName.
Component.Fields.<FieldName>.Values
an array of the various values of a multivalue field called <FieldName> of the Component. Create a repeating region to iterate over these values.
Component.MetaData.<FieldName>
the value of a metadata field of the Component called <FieldName> (only use this construction if you have a metadata field called Title, Name or ID, or if you have a metadata field with the same name as a data field).
Component.Schema.Title or Component.Schema.Name
the name of the Schema on which this Component is based, as specified in Content Manager
Component.Schema.ID
the Content Manager URI (unique identifier) of the Schema on which this Component is based.