How can I render component link field in a DWT?
-
11-06-2021 - |
Question
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?
Solution
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:
- Retrieving values of a linked component in Dreamweaver TBB - and making it SiteEditable
- How to handle nested repeating regions in Dreamweaver TBBs in SDL Tridion 2011 SP1
- Retrieving values of a linked component in Dreamweaver TBB - and making it SiteEditable
I suggest you read them and apply your understanding of them.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow