[英]Need help to create component template using Template building block
I need help with following scenario: 我需要以下方案的帮助:
I have page template PT1 , which contains 2 TBBs and I have component template CT1, which contains 1 TBB. 我有页面模板PT1,它包含2个TBB,我有组件模板CT1,其中包含1 TBB。
I created a page using the Page Template(PT1) and added a component and selected the component template (CT1). 我使用页面模板(PT1)创建了一个页面,并添加了一个组件并选择了组件模板(CT1)。
The TBBs pushing some text value to package and all three TBB are part of a single dotnet assembly and implemented in three different class, which is implementing "Itemplate" interface and implement "transform" method. TBB将一些文本值推送到包和所有三个TBB都是单个dotnet组件的一部分,并在三个不同的类中实现,即实现“Itemplate”接口并实现“转换”方法。
Problem: 问题:
In the published file i am able to see the content pushing by TBB used in Page Template PT1, but not able to see content which is pushing by TBB of Component Template CT1. 在已发布的文件中,我能够看到页面模板PT1中使用的TBB推送的内容,但无法看到组件模板CT1的TBB推送的内容。
Typically, to output from a template you need to create a DWT TBB unless you are directly sending Output from C# TBB. 通常,要从模板输出,您需要创建DWT TBB,除非您直接从C#TBB发送输出。
In your case, looks like you have all C# TBBs and are they outputting anything to the package. 在您的情况下,看起来您拥有所有C#TBB并且他们正在向包中输出任何内容。 If not then I even doubt your PT will output any html.
如果没有,那么我甚至怀疑你的PT会输出任何HTML。
You could use the Template Builder tool to debug your out of the template as in my comments the doc portal link will provide you guidance. 您可以使用模板生成器工具调试您的模板,因为在我的评论中,文档门户链接将为您提供指导。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.