2

I am working on Multisite Sitecore instance and For "multilist with search" field I am trying to return all descendant items under folder item from a specific template using these queries

StartSearchLocation=//*&TemplateFilter={1111111-1111-1111-1111-1111111111}

or

StartSearchLocation=descendant-or-self&TemplateFilter={1111111-1111-1111-1111-1111111111}

These queries return all items from this template Id from all sites nodes.

I need a query to return the descendant items under a specific item folder only.

2 Answers 2

0

You need to update your query little bit to make it work-

Example -

StartSearchLocation=query:descendant-or-self::*&TemplateFilter={1111111-1111-1111-1111-1111111111}

P.S. - You are using TemplateFilter as {1111111-1111-1111-1111-1111111111} but this id is a reserved id and assigned to /sitecore node in any Sitecore implementation. So, I assume that your actual template id is different.

0

I think, instead of using the name of the template you should use the template guid for the "StartSearchLocation" property. Which will help the particular query to prevent the extra loading in searching. for example

StartSearchLocation={your folder guid which you want to use as source folder}&TemplateFilter={your template guid which you want filter in the sourcce folder}

it will look something like StartSearchLocation={00000000-0000-0000-0000-000000000000}&TemplateFilter={00000000-0000-0000-0000-000000000000}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.