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?