1

Sitecore version: 9.0.2

What I am trying to do:

I have created a template. In one of the fields, I need to have my data type as 'TreeList'/ 'TreelistEx'. 'TreelistEx' is preferred.

The functionality is working fine till the time I am using just the start path, something like

query:/sitecore/content/Global Repository/Regions

The moment I try to use the parameters as provided here https://getfishtank.ca/blog/treelist-data-source-hidden-functionality my start items shifts to the root item 'Sitecore'.

I tried using all lower caps in the name. But couldn't crack it.

Few examples which I tried:

  • query:/sitecore/content/Global Repository/Regions&excludetemplatesfordisplay=Category Folder,Product Folder

  • query:/sitecore/content/Global
    Repository/Regions&excludetemplatesfordisplay=category folder,product folder

  • query:/sitecore/content/Global
    Repository/Regions&excludetemplatesfordisplay={332CCC6E-4838-49FA-B11A-8E821E45DB4C}

  • query:/sitecore/content/Global Repository/Regions&Excludetemplatesfordisplay=country

What I am missing?

  • Did you try datasource=/sitecore/content/Global Repository/Regions&... instead of query:/.... ? – Gatogordo Sep 27 '19 at 14:09
2

You have to use either datasource= (and not a query). Or a query:. You can't mix them. You can't mix additional parameters when using query:.

Unfortunately, as the code is currently implemented, you cannot specify both a query AND parameters to restrict the items.

Source: Specifying query and parameters for Sitecore Treelist Field Source

For your use case however, using datasource= will be just fine. You're not actually doing any querying.

| improve this answer | |
  • Thanks for the prompt help. – NutsAndBolts Sep 28 '19 at 13:48

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.