12 votes
Accepted

How to filter items by language in Treelist field

There's already answer to similar problem on Stack Overflow: https://stackoverflow.com/questions/21452260/sitecore-tree-list-datasource-versionexist In a nutshell, what you need to do: Create DataView ...
10 votes
Accepted

How do I define multiple sources in the Source of a Treelist field?

This will require customization. Luckily for you, Kam has an example available at http://kamsar.net/index.php/2015/05/A-Multiple-Root-Treelist-Field/ This should do the trick.
6 votes
Accepted

Retrieving multiple items in treelist query

The reason only the first result is available for selection is because the treelist query sets the root item for selection, not the available list of items. Instead you should use enhanced syntax ...
  • 13.7k
5 votes

How do I define multiple sources in the Source of a Treelist field?

Not to self-promote, but I actually wrote a blog post on how to create a Multi-Root Treelist a little while back, based on Kam's post on multi-root Treelists, enhanced with support for using data ...
4 votes

How to set relative path for datasource of treelistEx field

Treelist and DropTree use a different syntax if you want to stay with the ootb options. The Treelist parameters are explained here: https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-...
  • 19.3k
3 votes

How to query multiple datasources & multiple templates in sitecore query

For multiple datasource location, for a Multi-list field, you should use 2 ||. So, your query will be as follows: sitecore/content/site1/home/articles/*/*||/sitecore/content/site2/home/rewards/*/*[@@...
3 votes
Accepted

How to query Specialized TreeList using GraphQL

Solved it by adding the mapping for Specialized TreeList in the graphql content config. Config Path: inetpub\wwwroot\sitename\Website\App_Config\Sitecore\Services.GraphQL\Sitecore.Services.GraphQL....
3 votes

How to filter items by language in Treelist field

In case anyone wants another solution. Viacheslav from Sitecore support suggested the following which is copying existing Treelist code and adding IDs of unwanted items to the ExcludeItemsForDisplay ...
  • 1,752
2 votes
Accepted

Fill TagTreelist field programmatically (SXA)

If item.Fields["Field Name"].Value = "some string"; throws null reference exception and item["Field Name"] = "some string"; does not throw the exception, it means that the item doesn't have a ...
  • 20.6k
2 votes
Accepted

Multiroot Treelist with datasource queries

Try to apply datasource query like this - datasource=/sitecore/templates/Page Templates|/sitecore/templates/Item Templates&IncludeItemsForDisplay=Template1,Template2,Template3&...
2 votes
Accepted

Template field | Exclude filter on basis of template for TreeList and TreelistEx

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, ...
  • 24.5k
1 vote

Showing selected folder from the content node in tree-list is not working

If I'm reading that tree right, then your problem here is that by excluding the Catetgory item in the display, Sitecore can then not show any children of a Category So take this list: category1 ...
  • 19k
1 vote

TreelistEx souce query not working

If you want to give the option to select from multiple datasource, then you can create a custom control. Create new item MultiDatasourceTreelist using /sitecore/templates/System/Templates/Template ...
  • 1,902
1 vote

Sitecore Treelist - How to select all child items into selected list(left to right window) based on parent selection?

The default Treelist does not support selecting all children at the same time. If you are going to create your own control, be mindful of the implications of selecting all of your children's nested ...
1 vote
Accepted

Multi-root treelist with queries

I fixed the issue myself with some interesting findings. The customer this concerns is running Sitecore 8.1, different versions might yield different results. As mentioned in the EDIT's debug copy-...
  • 181
1 vote

How to replace an item with another item by ID in Treelist field using Powershell?

You could try something similar to what I have here with pse and adapt it with your use case if needed. And basically, broken link usually (if not all the time, not quite sure) use {00000000-0000-0000-...
1 vote
Accepted

DynamicPlaceholder get Parameter Templates Treelistvalues

Rendering parameters are stored as name-value-collection (like a query string) with just the raw value - which for a multi-list field is a pipe-separated list of IDs. You could change your ...
  • 3,235
1 vote

How to add new items to a Treelist field in the Datasource item from SXA edit mode like Link List

If you are talking about this button on the Link List: Than it's custom edit frame button which is located /sitecore/content/Applications/WebEdit/Edit Frame Buttons/Link/Insert Sibling in the Core ...
1 vote

Sitecore Read a treelist field in view rendering

You should use the Sitecore.Mvc.Presentation.RenderingModel as your model and then retrieve a Sitecore context item from it, rather then defining the Sitecore.Data.Items.Item as a model. So, you ...

Only top scored, non community-wiki answers of a minimum length are eligible