Repository navigation
Let UmbracoContentDataListSource support descendants
#577
Replies: 2 comments 1 reply
|
Hi @enkelmedia Would you be willing to share your custom DataSource by any chance? I have the exact same problem on an upgrade from v13 to v17 where I was using the (far superior 😁) Umbraco Content By XPath picker, which, alas - is no more 😢 Thanks 👍 |
|
Hi! I was doing some "proof of concept" work for a upgrade that we're still working on just to know that it could be solved. So I really only have a copy of the original But essentially, I just changed this line To: _documentNavigationQueryService.TryGetDescendantsKeys(start.Key, out var childKeys) == true)Depending on your exact use case, I've also been following a issue in the Umbraco CMS core that tries to make it possible to list descentands in the way that I was looking for, when this PR lands it will make my use case possible the the "out of the box" picker. umbraco/Umbraco-CMS#23600 Anyway, I've created a gist if you want to give the copied data source for Contentment a spinn :) https://gist.github.com/enkelmedia/77bb552b28259ac441bcb3a7dbb21dd4 🎉 |
Uh oh!
There was an error while loading. Please reload this page.
We often need a way to show a list of pickable "Descendants" of certain types in different levels of the tree.
The current implementation of
UmbracoContentDataListSourcewill list children of the first item returned by the Content Root Query.I've tried to get the core Content Picker to work the way I want but without success so I ended up with this question in the forum https://forum.umbraco.com/t/content-picker-and-dynamic-roots/8655/2
So, I've implemented a custom data source
UmbracoContentDescendantsDataSourcethat basically just fetches "Descendats" over being hardcoded to use Children.Maybe the core
UmbracoContentDataListSourcecould have a option to fetchDescendants- OR if this could be a separate data source.I would be happy to help out if I know the direction 😊
All reactions