sitecore rock查询语法

时间:2011-07-14 17:51:11

标签: sitecore sitecore-rocks

最近开始在sitecore中使用查询分析器,但我想知道是否有一种方法可以比id,name,template,path等查询更深入。

例如item["mycustomerfield"] = 'something specific'查询。 sitecore rocks在ctp中,文档仍然存在。

1 个答案:

答案 0 :(得分:10)

使用查询分析器可以做很多事情。

John West有a nice introduction here

除此之外,使用Help关键字可以为您提供一些指示。如果您输入help select,您会获得select关键字的详细帮助 - 包括EBNF语法。

您还可以使用Sitecore Explorer中的脚本命令:工具|脚本|选择。

以下是一个例子:

从/ sitecore / content下使用Sample Item模板的所有项目中选择Title和Text字段。

select @title, @text from /sitecore/content//*[@@templatekey = 'sample item']

注意系统属性templatekey之前的@@

除此之外,您应该熟悉标识符转义。由于Sitecore字段名称可能包含空格,因此您必须将它们括在##

这将从家中选择字段长文:

select @#Long Text# from /sitecore/content/Home
相关问题