Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doctype filter to UmbracoContentDataListSource #79

Closed
dawoe opened this issue Mar 18, 2021 · 2 comments
Closed

Add doctype filter to UmbracoContentDataListSource #79

dawoe opened this issue Mar 18, 2021 · 2 comments
Assignees
Labels
feature-request New feature request
Milestone

Comments

@dawoe
Copy link
Contributor

dawoe commented Mar 18, 2021

Is your feature request related to a problem? Please describe.

I have site setup where articles can live in multiple locations in the tree. The tree is structured like this

  • Category
    • Subcategory
      • Article

I want to a editor to be able to pick only articles. But the UmbracoContentDataListSource only allows to set a start node.
In my case that would be the parent of the category node, but this does not prevent the editor from selecting categories or subcategories.

Describe the solution you'd like

I would like to see a doctype restriction on the data source. So I can have a startnode high up the tree, but only allow for a certain doctype to be picked. With a custom editor or templated editor I can than make it look nice for editors.

Describe alternatives you've considered

I think for now MNTP is the only alternative. But than a editor needs to add each article one at a time. With a custom editor I could have like a multi select option.

Additional context

Because the UmbracoContentDataListSource is sealed I can't inherit it to make extension. So for now I need to copy the source in to my own custom list and make modifications there.

@dawoe dawoe added the feature-request New feature request label Mar 18, 2021
@leekelleher
Copy link
Owner

Hi @dawoe, thanks for raising this. Conceptually it's similar to what @bjarnef is asking in #78.

My general response is the same as #78 (comment).

I'd explored quite a few options while developing the "Umbraco Content" data-source. Unsure how much XPath would be promoted (within the Umbraco ecosystem) moving forwards, so didn't want to go too heavy on it. So I settled for a simpler use-case of selecting child nodes, (which is all I've used it for on my own client projects so far).

However since this has now been asked twice in the past week or so, I'll give it some more thought. 💡 👍
I doubt I'll have anything immediate though, so custom modified data-source is the way to go in the meantime.

@leekelleher
Copy link
Owner

ref: I've left the same comment on #78 (comment).

Closing this ticket off. I've added a hidden feature 🤫 to upcoming v1.4, to have an advanced XPath for querying Umbraco Content, ref: commit 2f94022.

re: hidden features, I've developed many custom data-sources, but feel that a long list of data-sources would be quite overwhelming for a non-advanced user, so have made them to be "unlockable" features. I'll explain more closer to the time of v1.4 release.

@leekelleher leekelleher added this to the 1.4.0 milestone Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants