在 Field 'source' 中使用 Sitecore 查询无法正常工作
Using Sitecore query in Field 'source' not working properly
我在一个字段的源中使用 sitecore 查询 Subsidiary
:
/sitecore/content/Home/Organization/descendant::*[@@templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
字段类型是:Droplist
所以当我看到基于上述模板的项目并单击该字段时,我没有看到任何东西。
您还可以查看图片了解更多详情。
这是 template
,我在 source
中给出上面的 query
。
这是我在 item
字段中看到的 Subsidiary
您需要在 xpath 前加上 query:
query:/sitecore/content/Home/Organization/descendant::*[@@templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
您也可以将 shorthand 用于 descendant::
:
query:/sitecore/content/Home/Organization//*[@@templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
我在一个字段的源中使用 sitecore 查询 Subsidiary
:
/sitecore/content/Home/Organization/descendant::*[@@templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
字段类型是:Droplist
所以当我看到基于上述模板的项目并单击该字段时,我没有看到任何东西。
您还可以查看图片了解更多详情。
这是 template
,我在 source
中给出上面的 query
。
这是我在 item
字段中看到的 Subsidiary
您需要在 xpath 前加上 query:
query:/sitecore/content/Home/Organization/descendant::*[@@templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
您也可以将 shorthand 用于 descendant::
:
query:/sitecore/content/Home/Organization//*[@@templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']