查询Sitecore Droplink字段

查询Sitecore Droplink字段,sitecore,sitecore6,Sitecore,Sitecore6,以下Sitecore查询在XPath Builder中适用: /sitecore/content/Home/CareAndTreatment//*[@Title='Birth Marks and other skin conditions'] 但检查DropLink字段而不是单行文本字段的类似查询不会返回任何结果: /sitecore/content/Home/CareAndTreatment//*[@TreatmentType='Conditions'] 单行文本和Droplink的查询语

以下Sitecore查询在XPath Builder中适用:

/sitecore/content/Home/CareAndTreatment//*[@Title='Birth Marks and other skin conditions']
但检查DropLink字段而不是单行文本字段的类似查询不会返回任何结果:

/sitecore/content/Home/CareAndTreatment//*[@TreatmentType='Conditions']
单行文本和Droplink的查询语言是否存在语法差异


[注意:这些示例使用Sitecore 6.2]

解决方案没有那么难,请在前面加上查询,例如:

query:/sitecore/content/Home/CareAndTreatment//*[@TreatmentType='Conditions']
另见:
(2.4.2)

我可能错了,但是。。。DropLink字段不是存储项目ID而不是文本吗?所以你必须对此提出质疑

DropList-将文本存储为原始值
DropLink-将ID存储为原始值


也许查询API会考虑到这一点?

Sitecore会让人感到困惑。我正在使用XPath构建器测试查询(开发人员中心->工具->XPath构建器),如果您在开始时键入“query:”,它将不起作用。如果您这样做了,它会显示“位置5处应为字符串结尾”。我知道该工具可以工作,因为第一个查询可以工作。如果您正在测试来自开发中心的Sitecore查询,您不需要“查询:”部分,因为这暗示了这一点。把你想要的放在这之后。