0

I am new to SDL Tridion,just exploring content delivery. I used below code in the TBB of my pagetemplate

<% 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>

I have published that component and used a dynamic component template. But no content is reflecting on the page.Did i missed something?

Chris Summers
  • 10,153
  • 1
  • 21
  • 46
roop
  • 101
  • 1
  • Hi, am i mistaken or does your question have nothing to do with `Simple DirectMedia Layer (SDL)` as is tagged with `SDL` ? Also please clarify what language you are using. –  Apr 13 '13 at 21:06
  • Also, you may want to use the Tridion-dedicated stacked exchange site on http://tridion.stackexchange.com for your Tridion questions. – Nuno Linhares Apr 14 '13 at 07:14

1 Answers1

2

Try removing the whitespace from the uri tcm:0-6-1 and your code should read factory.GetComponentPresentation("tcm:6-9841","tcm:6-9858-32");

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Chris Summers
  • 10,153
  • 1
  • 21
  • 46