And*_*ick 1 xpath sitecore sitecore7
我使用Sitecore开发人员中心Sitecore XPath Builder来创建查询.
以下查询在源字段中正常工作:
fast:/sitecore/content/#Product Information#/#Image Galleries#//*
此查询返回图像库下面的所有对象,但这不是我想要的.我想只包含一个名为"图库"的特定模板.我写了这个查询.
fast:/sitecore/content/#Product Information#/#Image Galleries#//*[@@templatename='Image Gallery']
此查询正确返回XPath Builder/Sitecore查询表示法中的信息,但当放在另一个项目的源字段中时,它会失败并返回此错误.
预计在第5位的字符串结束.
谢谢阅读!:)
这适用于所有列表类型字段.您是否使用该确切查询作为您的字段的DataSource?如果是这样,则query:在指定为Source时需要前缀.
query:fast:/sitecore/content/#Product Information#/#Image Galleries#//*[@@templatename='Image Gallery']