Editing fields inline
To enable inline editing on specific fields, you typically mark use the FieldStartMarker(field), FieldEndMarker(), FieldValueStartMarker(index) and FieldValueEndMarker() functions in a Dreamweaver Template Building Block, which you include in your Component Template.
You can use these functions if you use the Dreamweaver Mediator, using field and index as follows:
field-
indicates the field of the Component in the Component Presentation being rendered using a source expression relative to this Component. For example,
Fields.Address.Streetrefers to the fieldStreetin the Embedded SchemaAddressof the component content index- indicates the value-index of a multivalue field, starting at 0. Set this value to 0 if the field is a single-value field.
The following is an example of Dreamweaver syntax for marking a single-value Component field:
@@FieldStartMarker("Fields.Description")@@
@@FieldValueStartMarker(0)@@
@@GetFieldValue("Fields.Description")@@
@@FieldValueEndMarker()@@
@@FieldEndMarker()@@
The following is an example of Dreamweaver syntax for marking a multivalue Component field:
@@FieldStartMarker("Fields.CustomerIDs")@@
<!-- TemplateBeginRepeat name="Fields.CustomerIDs" -->
@@FieldValueStartMarker(TemplateRepeatIndex)@@
@@GetFieldValue("Fields.CustomerIDs", TemplateRepeatIndex)@@
@@FieldValueEndMarker()@@
<!-- TemplateEndRepeat -->
@@FieldEndMarker()@@
If you are not using the Dreamweaver Mediator, the following is an example of TCDL tag syntax for marking Component fields:
<tcdl:Field xPath="tcm:Content/custom:Content/custom:Addressees" itemId="tcm:1-109">
<tcdl:FieldValue index="0">
ValueOfField
</tcdl:FieldValue>
</tcdl:Field>
where:
itemIdis the Content Manager URI of the ComponentxPathis the XPath to the field in the Component XMLindexis the (zero-based) value index of the values in the field (0 if the field is a single-value field)ValueOfFieldis the value of the field to be added as element value (this is removed by the Default Finish Action Template Building lock running at the end of a Component Template).