We have SiteEdit 2009 SP2 in SDL Tridion 2009 SP1 and it is working fine for normal published pages. It is also working ok if we have single Dynamic Component Presentation (DCP) in a page. But when we have multiple DCPs on the page, it is taking the first one only and ignoring all others.
Here is my code
<xsl:variable name="SE_CP_MarkUP">
<![CDATA[ <!-- Start SiteEdit Component Presentation: {"ID" : "cp_%ID%", "ComponentID" : "%ID%", "ComponentTemplateID" : "tcm:XX-XXXXX-32", "Version" : 0, "IsQueryBased" : true } -->]]>
I am using this variable in loop
<xsl:value-of select="XXXX:RegexStringReplace($SE_CP_MarkUP,'%ID%',@ID)" disable-output-escaping="yes"/>
Please suggest what could be the issue?
More Detail:
Generated HTML
<div>
<!-- Start SiteEdit Component Presentation: {"ID" : "cp_tcm:13-287142", "ComponentID" : "tcm:13-287142", "ComponentTemplateID" : "tcm:13-286965-32", "Version" : 3, "IsQueryBased" : true } -->
HTMLConent
</div>
<div>
<!-- Start SiteEdit Component Presentation: {"ID" : "cp_tcm:13-287162", "ComponentID" : "tcm:13-287162", "ComponentTemplateID" : "tcm:13-286965-32", "Version" : 2, "IsQueryBased" : true } -->
HTMLConent
</div>
<div>
<!-- Start SiteEdit Component Presentation: {"ID" : "cp_tcm:13-287204", "ComponentID" : "tcm:13-287204", "ComponentTemplateID" : "tcm:13-286965-32", "Version" : 1, "IsQueryBased" : true } -->
HTMLConent
</div>
<div>
<!-- Start SiteEdit Component Presentation: {"ID" : "cp_tcm:13-287234", "ComponentID" : "tcm:13-287234", "ComponentTemplateID" : "tcm:13-286965-32", "Version" : 4, "IsQueryBased" : true } -->
HTMLConent
</div>
<div>
<!-- Start SiteEdit Component Presentation: {"ID" : "cp_tcm:13-287251", "ComponentID" : "tcm:13-287251", "ComponentTemplateID" : "tcm:13-286965-32", "Version" : 3, "IsQueryBased" : true } -->
HTMLConent
</div>
SiteEdit Settings
<!-- SiteEdit Settings: { "PageID" : "tcm:13-287332-64", "PageVersion" : 2, "TargetTypeID" : "", "ComponentPresentationLocation" : 1, "BluePrinting" : { "PageContext" : "tcm:0-8-1", "ComponentContext" : "tcm:0-13-1", "PublishContext" : "tcm:0-13-1"}} -->
I am getting above html on run time. I am able to open only first component using siteedit on hovering on first CP and nothing happens if I hover on any other CPs.
Also there is no JS error on page.
Thanks, Vikas Kumar
The SiteEdit Component Presentation markup should always be wrapped in an HTML element like a DIV for instance, that way SiteEdit can distinguish the beginning and end of your Component Presentation.
So in your loop you should output something like: