1

I'm trying to build a search query to find an item that is a child of the current item. Something like this:

custom:path|./_local/*

But this returns 0 results (should be 3 results). How do I do this?

  • Where are you executing the query? Is it a datasource? – Hishaam Namooya Sep 12 at 14:33
  • Yes, it's the datasource field of a control/component – devzero Sep 16 at 6:53
0

If this is the source query for a field, you can use:

query:../_local/*

For Datasource Location on a rendering you can put in:

./_local
  • 0 results. This is not for a field, but for the datasource for a component – devzero Sep 16 at 6:54
  • @devzero I updated my answer for rendering datasource location – Ahmed Okour Sep 16 at 16:47
  • Does not work. What works is the absolute path "/sitecore/content/home/item/_Local/TextSpot". What does not work: "./_local/TextSpot". Text spot is a controll on the "item" – devzero Sep 16 at 19:51
0

Just make sure "_local" is the actual item name in your case, following worked fine for me in the "Datasource location" rendering def. field:

query:.//*[@@name='local']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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