Multiple Data Sources for Treelist

Quick question ... I have a tweeter, and I want the request to be retrieved from several folders of my content tree. How to establish a choice from several data sources? I have not found much in this, and I am wondering if this is due to a change in the type of request you are using. Right now, I have this query in the template for this particular list item:

DataSource=/Sitecore/Content/Home/Home Root/Industries/&IncludeTemplatesForDisplay=Industry Item,Additional Resources Grouping,Additional Resources Item&IncludeTemplatesForSelection=Industry Item,Additional Resources Grouping,Additional Resources Item 

I basically want to replicate the request above, but also pull from / Sitecore / Content / Home / Home Root / Products

Any suggestions on how to do this?

+4
source share
2 answers

I don't think this supports multiple datasource paths, but as this forum discusses the forum (from John West), you can maybe click on the getLookupSourceItems pipeline.

You can also create a custom treelist that extends the built-in and expands this functionality on your new one. You can use ILSpy to decompile the current one.

+4
source

This is obviously SUPER late, but for future reference, I guess. I had a similar question myself, and I found this and found what, in my opinion, is a solution (at least in Sitecore 6.4).

You have a choice for "ExcludeItemsForDisplay", which displays a list of identifiers. If you go back one level to

"DataSource = / Sitecore / Content / Home / Home Root"

And add "ExcludeItemsForDisplay = {folder identifier to ignore), {long identifier that appears at the top of Quick Info}, {etc}", you should be able to exclude any folders that DO NOT want to appear and only save the ones you want to.

IncludeItemsForDisplay is too strict (and a little I mean a lot) to use if you don't have just a few things you want to get.

So hopefully this will help with any future issues. (Or the same problem if you hacked it earlier)

Your new source does not include the actual identifier, of course:

 DataSource=/Sitecore/Content/Home/Home Root&IncludeTemplatesForDisplay=Industry Item,Additional Resources Grouping,Additional Resources Item&IncludeTemplatesForSelection=Industry Item,Additional Resources Grouping,Additional Resources Item&ExcludeItemsForDisplay={12345678-1234-1234-123456789}, {#####-####-####}, {### etc} 

Hope this helps (at least the next person who may run into the same issue).

As well as a side note, since by manually modifying the Exclude sounds that are disappointing in a system that can change, your folders also have templates that can be included in IncludeTemplates. Therefore, if you give special folder templates for your industry and products, you can also add them to the IncludeTemplatesForDisplay line. Achieving hopes for the same more supportive effect. I have not tested this though.

+4
source

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


All Articles