Sitecore MultiSite中的DataSource限制

Gau*_*rav 3 sitecore sitecore-mvc sitecore8

我有一个多站点解决方案 内容| --- Site1 | | --- Home1 | | --- Site2 | --- Home2

其中Site1的Home1项和Site2的Home2项使用相同的模板HomeTemplate.我在HomeTemplate中有一个多列表,我必须以这样的方式提供数据源:在Home1项目中,多列表填充了Site1和In Home2项目的内容,多列表填充了Site2的内容(根据站点).这可能是使用Sitecore查询还是有其他方法可以做到这一点?

Vla*_*giu 7

您可以拥有一个查询字符串,如多列表字段的数据源

查询:./../*

要么

查询:./ ancestor-or-self :: [@@ templatename ='HomeTemplate'] /../

请查看下一个链接以获取更多详细信息源字段查询

http://blog.arkesystems.com/post/2011/03/22/Sitecore-Using-the-Source-Property.aspx