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.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>(only use this construction if you have a data field calledTitle,NameorID). 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>(only use this construction if you have a metadata field calledTitle,NameorID, or if you have a metadata field with the same name as a data field). 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.