Fast Query is only working with Database but not with Items.
快速查询只与数据库一起工作,而不与项目一起工作。
this is working:-
这是工作:-
Syntax: Sitecore.Context.Database.SelectItems("fast://*[@@templatename='Course Description']");
this is not working:-
这不是工作:-
Syntax:Sitecore.context.Item.Axes.SelectItems("fast://*[@@templatename='Course Description']");
I am getting this error: End of string expected at position 4.
我得到了这个错误:在位置4的期望结束。
1 个解决方案
#1
2
This is by design. From the Using Sitecore Fast Query documentation at: http://sdn.sitecore.net/upload/sdn5/developer/using%20sitecore%20fast%20query/using%20sitecore%20fast%20query.pdf
这是通过设计。从使用Sitecore的快速查询文档可以看到:http://sdn.sitecore.net/upload/sdn5/developer/using%20sitecore%20fast%20fast % 20fasty/using%20sitecore%20fast%208/20query.pdf
Sitecore Fast Query can be used:
可以使用Sitecore快速查询:
- In the Content Editor as a source for List Type fields.
- 在内容编辑器中作为列表类型字段的源。
- In the Developer Center, in the XPath Builder tab.
- 在Developer Center中,在XPath生成器选项卡中。
- In custom .NET code by using the SelectSingleItem() method and the SelectItems() methods of the Sitecore.Data.Database class.
- 在自定义。net代码中,使用Sitecore.Data的SelectSingleItem()方法和SelectItems()方法。数据库类。
#1
2
This is by design. From the Using Sitecore Fast Query documentation at: http://sdn.sitecore.net/upload/sdn5/developer/using%20sitecore%20fast%20query/using%20sitecore%20fast%20query.pdf
这是通过设计。从使用Sitecore的快速查询文档可以看到:http://sdn.sitecore.net/upload/sdn5/developer/using%20sitecore%20fast%20fast % 20fasty/using%20sitecore%20fast%208/20query.pdf
Sitecore Fast Query can be used:
可以使用Sitecore快速查询:
- In the Content Editor as a source for List Type fields.
- 在内容编辑器中作为列表类型字段的源。
- In the Developer Center, in the XPath Builder tab.
- 在Developer Center中,在XPath生成器选项卡中。
- In custom .NET code by using the SelectSingleItem() method and the SelectItems() methods of the Sitecore.Data.Database class.
- 在自定义。net代码中,使用Sitecore.Data的SelectSingleItem()方法和SelectItems()方法。数据库类。