Copied to clipboard

Flag this post as spam?

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


  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 09:59
    Anders Brohus
    0

    Mutlinode treepicker xpath question

    Hi :)

    I got a question about the mutlinode treepicker in the Umbraco backend, because as i understand you can "filter" in the treepicker so it displays all nodes with the documenttype "Video", but i can't get it to work?

    I display just like before without any filtering.

    But is it possible?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 02, 2015 @ 10:18
    Dennis Aaen
    0

    Hi Anders,

    Yes it possible to filter the node that are showing the the multinode treepicker. So your customer only can selected nodes of a specific document type or document types.

    Try to see this documentation about the multinode tree picker. https://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Multinode-Treepicker

    As you can see there is a field called filter out items with type, there you can add the document type alias that you want the user to be able to pick.

    It´s a comma separated list if you have more than one document type.

    Hope this helps.

    /Dennis

  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 11:00
    Anders Brohus
    0

    Hmmm i don't have the field for filter :(

    But as i'm trying to make is that it takes all nodes from the whole site with the documenttype called "Video"

    No filter field

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 02, 2015 @ 11:03
    Dennis Aaen
    0

    Hi Anders,

    Okay what if you then just add Video in the field called Allow items of type.

    That should do the trick.

    Hope this helps,

    /Dennis

  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 11:13
    Anders Brohus
    0

    If i add the "Video" to Allow items of type, then it displays all nodes but the ones that aint "Video", is disabled :(

    I was looking after a solution where it goes though the whole websites and only display the Video nodes :)

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 02, 2015 @ 11:24
    Dennis Aaen
    0

    Okay what if you then use the xpath function and then add the xpath query like this.

    $root//Video
    

    Hope this helps,

    /Dennis

  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 11:45
    Anders Brohus
    0

    Then it's just empty..

    My document type "tree" is looking like this

    Block

    I don't know if it changes anything?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 02, 2015 @ 11:52
    Dennis Aaen
    0

    Hi Anders,

    Okay does it works if your are using $site instead of $root

    $site//Video
    

    Or maybe just

    $site/Video
    

    Hope this helps,

    /Dennis

  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 12:05
    Anders Brohus
    0

    The first one do not display anything, but the one below is displaying the whole node tree like it was just `

    $site
    
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 02, 2015 @ 12:17
    Dennis Aaen
    0

    Hi Anders,

    I found a project where I have done, something similar. Try to see the screenshot below.

    enter image description here

    Here you could get nodes that has these document types for the whole site.

    Hope this helps, and do what you want.

    /Dennis

  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 12:27
    Anders Brohus
    0

    How does yours look like in the content section because mine looks like this

    Content

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 02, 2015 @ 12:47
    Dennis Aaen
    100

    Hi Anders,

    Okay, then you perhaps need to dot you though it. Like this

    $site/Bloks/YoutubeBlok
    

    and then add video as the allow items of type. Remember to change the aliases so it match your case.

    /Dennis

  • Anders Brohus 194 posts 475 karma points
    Jul 02, 2015 @ 13:04
    Anders Brohus
    0

    Okay so now it works with my first "Block", but if i have two blocks it only display the videoes from the first one, and "forgets" the second one and they got same document type alias and so on

Please Sign in or register to post replies

Write your reply to:

Draft