2

I have the following setup:

Two component templates: CT Commercial, CT Commercial block, both dynamic and set to REL. Commercial is a simple component with title and text. Commercial block has a block title and link to one or more commercial component.

CT Commercial:

<h3>@@Component.Fields.title@@</h3>
<p>@@Component.Fields.text@@</p>

CT Commercial Block:

<h1>@@Component.Fields.commercialtitle@@</h1>
   <!-- TemplateBeginRepeat name="commerciallist" -->
      @@RenderComponentPresentation(Field, "tcm:32-17299-32")@@ 
   <!-- TemplateEndRepeat -->

I have Component Commercial_1 with title="Title 1" and text="Text 1"

I have Component Commercial_Block_1 with title="Commercial block 1 title" and commerciallist="tcm:32-17297" // link to Commercial_1 component

When I publish Commercial_1 to broker DB in the COMPONENT_PRESENTATIONS table I have

<h3>Title 1</h3>
<p>Text 1</p>

When I publish Commercial_Block_1 to broker DB in the COMPONENT_PRESENTATIONS table I have

<h1>Commercial block 1 title</h1>
<tcdl:ComponentPresentation type="Embedded" componentURI="tcm:32-17297" templateURI="tcm:32-17299-32" xmlns:tcdl="http://www.tridion.com/ContentDelivery/5.3/TCDL"><h3>Title 1</h3>
<p>Text 1</p></tcdl:ComponentPresentation>

Component Commercial_Block_1 is added to a page as Component presentation and page is published. Page output is:

<tridion:ComponentPresentation runat="server" PageURI="tcm:32-17305-64" ComponentURI="tcm:32-19345" TemplateURI="tcm:32-19335-32"/> 

This returns Commercial_Block_1 with appropriate CT from the broker DB and my page has following html:

<h1>Commercial block 1 title</h1>
<h3>Title 1</h3>
<p>Text 1</p>

Everything fine so far.

Now, I would like to change Commercial_1 title to "Changed Title 1" and republish Commercial_1 as dynamic component.

I was hoping that this would produce a change on my page, but it does not. It seems that when

<h1>Commercial block 1 title</h1>
    <tcdl:ComponentPresentation type="Embedded" componentURI="tcm:32-17297" templateURI="tcm:32-17299-32" xmlns:tcdl="http://www.tridion.com/ContentDelivery/5.3/TCDL"><h3>Title 1</h3>
    <p>Text 1</p></tcdl:ComponentPresentation>

is retrieved form the DB I get the Embedded content from inside the component presentation tag instead of content from that component presentation.

Is this behavior by design, or am I doing something wrong?

Note: When I replace

<tcdl:ComponentPresentation type="Embedded" componentURI="tcm:32-17297" templateURI="tcm:32-17299-32" xmlns:tcdl="http://www.tridion.com/ContentDelivery/5.3/TCDL"><h3>Title 1</h3>
<p>Text 1</p></tcdl:ComponentPresentation>

with

<tcdl:ComponentPresentation type="Dynamic" ComponentURI="tcm:32-17297"  TemplateURI="tcm:32-17299-32"/>

in the broker DB , everything is working as expected (republishing Commercial_1 component is producing visible change on my page ).

If this is caused by Embedded vs Dynamic type, how can I change output of RenderComponentPresentation to create type Dynamic instead of Embedded?

2

I've had the same issue before, I managed it in the same way you did, I just added <tcdl:ComponentPresentation type="Dynamic" />, I think you can continue doing it. What I did is to add a .NET TBB at the end in order to keep it as Embedded when it is in preview mode and Dynamic with it is in Publishing mode

UPDATE Checking a little bit the source code for the Render Engine, it seems that @@RenderComponentPresentation@@ will produce <tcdl:ComponentPresentation type="Dynamic" /> if the Context item is a Page if not it will always produce <tcdl:ComponentPresentation type="Embedded" />

  • Hi Eric, indeed, RCP is producing dynamic on the PT level and Embedded on the CT level. If this is by design then I see no other solution then to go with your suggestion to change Embedded to Dynamic in the Output package item. Tnx – user3760419 Sep 24 '14 at 11:53
3

A hotfix is now available from Support for this setup, CM_2013.1.1.1832.zip for rendering in the context of a dynamic component presentation (without a page).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.