Sitecore Droplink Field Request

The following Sitecore query works for me in XPath Builder:

/sitecore/content/Home/CareAndTreatment//*[@Title='Birth Marks and other skin conditions'] 

However, a similar query that checks the DropLink field instead of the single-line text field does not return any results:

 /sitecore/content/Home/CareAndTreatment//*[@TreatmentType='Conditions'] 

Is there a difference in syntax in the query language for single-line text and spread?

[NOTE. These examples use Sitecore 6.2]

+4
source share
2 answers

I could be wrong, but ... Doesn't the DropLink field store the identifier of the element, not the text? So you have to request this.

DropList - save text as raw value
DropLink - stores the identifier as a raw value

Maybe the query API takes this into account?

+4
source

The solution is not so complicated, prefix it with a request, for example:

 query:/sitecore/content/Home/CareAndTreatment//*[@TreatmentType='Conditions'] 

See also: http://sdn.sitecore.net/Reference/Sitecore%206/Data%20Definition%20Cookbook.aspx (2.4.2)

+3
source

Source: https://habr.com/ru/post/1334841/


All Articles