2012-05-29 33 views
0

我有一个模式包含一个多值字段的类型组件链接。如何渲染DWT中的组件链接字段?

当我为该组件编写DWT TBB时,如何渲染此字段(使用其模板的组件链接)?

+0

请看看我在这里给出的例子:http://stackoverflow.com/questions/10256744/retrieving-values-of-a-linked-component-in-dreamweaver-tbb-and-making-it-sitee/ 10259792#10259792 –

+0

谢谢你的坦率.. – Coder

回答

4

Component Link字段链接到Component - 它不指定模板。所以我假设你想要指定在DWT上使用的组件模板。

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

所以这个遍历多值字段名YourComponentLinkFieldName的所有值并呈现在那里与挂钩组件模板tcm:1-2-32组件。

所有这些主题相关的你的问题:

  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

我建议你阅读并运用你对他们的了解。

+0

谢谢你的坦率... – Coder

+4

请记住,在内容移植到另一个环境时,在模板内硬编码tcm id将不起作用。您可能想通过参数提供CT tcm id。 –

+0

嵌套@@@@构造不起作用,但您可以轻松尝试而不是询问。如果你必须嵌套,你可以做一些像@@ outer $ {inner} @@。 –