我们在 SDL Tridion 2009 SP1 中安装了 SiteEdit 2009 SP2,它对于正常发布的页面运行良好。如果我们在页面中有单个动态组件表示(DCP),它也可以正常工作。但是,当页面上有多个 DCP 时,它只会采用第一个,而忽略所有其他 DCP。
这是我的代码
<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 } -->]]>
我在循环中使用这个变量
<xsl:value-of select="XXXX:RegexStringReplace($SE_CP_MarkUP,'%ID%',@ID)" disable-output-escaping="yes"/>
请提出可能是什么问题?
更多细节:
生成的 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: { "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"}} -->
我在运行时得到了高于 html 的结果。当我将鼠标悬停在第一个 CP 上时,我只能使用 siteedit 打开第一个组件,如果我将鼠标悬停在任何其他 CP 上,则不会发生任何情况。
页面上也没有JS错误。
谢谢, 维卡斯·库马尔
最佳答案
感谢您查看此内容,我刚刚意识到 SiteEdit 正在完成其工作。所有 SiteEdit 标记 div 都具有相同的绝对位置,这样无论我将鼠标悬停在哪里,div 都会显示在顶部。
我正在与设计团队合作进行排序。
谢谢, 维卡斯·库马尔
关于tridion - 页面上的多个动态 SiteEdit CP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11454604/