Component variable
Component denotes a single Component. You can access this variable in two ways:
- In a Compound Component Template, it denotes the Component being processed by the Template.
- In a Compound Page Template, you can use this variable within a repeating region (
Componentsor a named subset of Components) to refer to any Component in the set.
Component has the following subvariables:
Component.TitleorComponent.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> 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 Datathat has anAddressfield of type "Embedded Schema", you can access theStreetNamefield of that Embedded Schema by writingComponent.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>. Component.Schema.TitleorComponent.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.