Copied to clipboard

Flag this post as spam?

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


  • Olivier Casteleyn 17 posts 121 karma points
    Feb 23, 2018 @ 14:47
    Olivier Casteleyn
    0

    Contentpicker - filter nodes

    I want to use the multi contentpicker and I want to filter the nodes that are shown Example: - Products --product1 ----Enabled=1 --product2 ----Enabled=0 --product3 ----Enabled=1

    I want to show all products that are enabled. Can I do this with xpath? Or is this only for selecting a start node? (and thus all the children of that start node is shown)

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Feb 23, 2018 @ 14:50
    Alex Skrypnyk
    0

    Hi Olivier

    The recommended way of doing this with latest Umbraco is Razor

    Are you using latest Umbraco version?

    /Alex

  • Olivier Casteleyn 17 posts 121 karma points
    Feb 23, 2018 @ 14:51
    Olivier Casteleyn
    0

    Hey Alex,

    Yes, I do. Can I use Razor in the backend?

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Feb 23, 2018 @ 14:51
    Alex Skrypnyk
    0

    Ah, sorry, in backend - it's XPath

  • Olivier Casteleyn 17 posts 121 karma points
    Feb 23, 2018 @ 14:53
    Olivier Casteleyn
    0

    Alex,

    Yes, I know. Is there a way to filter the nodes shown by a multi content picker property? (so not just selecting the startnode, but also filtering the childs)

  • Matthew Wise 271 posts 1373 karma points MVP 5x c-trib
    Feb 23, 2018 @ 15:14
    Matthew Wise
    2

    Hi Oliver,

    You can only restrict by path and doc type as far as I know.

    Matt

  • Olivier Casteleyn 17 posts 121 karma points
    Feb 23, 2018 @ 15:57
    Olivier Casteleyn
    0

    Thx Matthew, Any idea how I can achieve my goal? Third party package?

  • Matthew Wise 271 posts 1373 karma points MVP 5x c-trib
    Feb 23, 2018 @ 16:02
    Matthew Wise
    1

    Not that I know of unless you created your own

    https://our.umbraco.org/documentation/extending/property-editors/

    Matt

  • Olivier Casteleyn 17 posts 121 karma points
    Mar 04, 2018 @ 09:38
    Olivier Casteleyn
    0

    Thx for the tip Matthew. But I will try it with nuPickers.

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Feb 23, 2018 @ 16:14
    Hendy Racher
    102

    Hi Olivier, you could use any of the XML pickers from nuPickers as the XPath can be used to select the nodes that can be picked from (rather than just the start node)

  • Olivier Casteleyn 17 posts 121 karma points
    Mar 04, 2018 @ 09:37
    Olivier Casteleyn
    1

    Thx for the tip Henry. nuPicker typeahead property editor does the trick!

Please Sign in or register to post replies

Write your reply to:

Draft