Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Houghton 33 posts 108 karma points
    Oct 16, 2017 @ 16:07
    David Houghton
    0

    Limit new content picker by Doctype

    Is it possible to limit the new content picker (Umbraco.ContentPicker2) to a list of allowed doctype(s), sort of like the multinode tree picker but with only being able to select one item.

    I know the new MNTP sort of works as you can configure this to only allow one item to be selected but even once this is done it still returns an IEnumerable and its a little clunky to put one item in a loop.

    I could be doing this wrong and theres another property type to use but as I can see I only have two options:

    • Use the MNTP, limited to only being able to select one item which still returns an IEnumerable.

    • Or use the Content picker isnt limitable to doctype, but picks one item and returns an IPublishedContent which is what I ultimately need.

    Seems messy and unessecary to loop over a single item... does it not?

  • Aaron 22 posts 93 karma points
    Sep 17, 2018 @ 09:59
    Aaron
    0

    We have the same problem with a new site build in 7.11.1.

    It would be a nice feature in future to able to constrain the doc type on Umbraco.ContentPicker2.

Please Sign in or register to post replies

Write your reply to:

Draft