How can I render component link field in a DWT?

1.9k Views Asked by At

I have a schema containing a multi-value field of type component link.

How can I render this field (component link with its template) when I write a DWT TBB for this component?

1

There are 1 best solutions below

3
On BEST ANSWER

A Component Link field links to a Component - it does not specify a template. So I'll assume you want to specify the Component Template to use on the DWT.

<!-- TemplateBeginRepeat name="Component.Fields.YourComponentLinkFieldName" -->
   @RenderComponentPresentation(Field, "tcm:1-2-32")@@
<!-- TemplateEndRepeat -->

So this loops over all values of the multi-value field names YourComponentLinkFieldName and render the Component linked in there with Component Template tcm:1-2-32.

All of these topics are relevant to your question:

  1. Retrieving values of a linked component in Dreamweaver TBB - and making it SiteEditable
  2. How to handle nested repeating regions in Dreamweaver TBBs in SDL Tridion 2011 SP1
  3. Retrieving values of a linked component in Dreamweaver TBB - and making it SiteEditable

I suggest you read them and apply your understanding of them.