Tridion 如何从brokerdb获取componentPresentation?
我是SDL Tridion的新手,只是在探索内容交付。 我在页面模板的TBB中使用了以下代码Tridion 如何从brokerdb获取componentPresentation?,tridion,tridion-content-delivery,Tridion,Tridion Content Delivery,我是SDL Tridion的新手,只是在探索内容交付。 我在页面模板的TBB中使用了以下代码 <% ComponentPresentationFactory factory = new ComponentPresentationFactory("tcm:0-6- 1"); ComponentPresentation ps = factory.GetComponentPresentationFactory("tcm:6-9841","tcm:6-9858-32"); if(ps!=nu
<% ComponentPresentationFactory factory = new ComponentPresentationFactory("tcm:0-6- 1");
ComponentPresentation ps = factory.GetComponentPresentationFactory("tcm:6-9841","tcm:6-9858-32");
if(ps!=null )
{
string output="";
output=ps.Content;
Literal1.Text=output;
}
%>
<asp:Literal id="Literal1"Text="" runat="server"<</asp:Literal>
尝试从uri tcm:0-6-1中删除空白,您的代码应为factory.GetComponentPresentation(“tcm:6-9841”、“tcm:6-9858-32”)代码>您好,是我弄错了,还是您的问题与带有SDL
标记的简单DirectMedia层(SDL)
无关?另外,请澄清您使用的是什么语言。此外,您可能希望使用上的Tridion专用堆叠exchange站点来回答Tridion问题。最后还请检查asp:Literal控件中的键入错误--它没有正确关闭。找到原因,与我传递的发布ID不匹配。