Copied to clipboard

Flag this post as spam?

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


  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 13, 2010 @ 11:33
    Jan Skovgaard
    0

    Possible to filter the document types to choose from with XPATH?

    Hi there

    First of all - Nice package you have created. I like the possibility to sort the nodes. Just what I'm missing from the otherwise great ultimate picker datatype in Umbraco.

    However I'm missing the opportunity to filter the nodes that should be shown in the tree. I have tried to make som XPATH expressions to only get for instance "News" and "Case" document types shown in the treeview. But it does not seem to be possible.

    I have tried using this expression "*//node[@nodeTypeAlias = 'Demo2']" in the "parent node id" field.

    Is the only option for XPATH only to use $currentPage and $currentParent like in the Axendo picker?

    /Jan

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 13, 2010 @ 11:59
    Douglas Robar
    1

    It might be possible to use an xpath expression without $currentPage or $currentParent but I've never tired it myself.

    This should work, though...

    $currentPage/ancestor-or-self::node [@level = 1]//node [@nodeTypeAlias = 'Demo2']

    cheers,
    doug.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 13, 2010 @ 12:23
    Jan Skovgaard
    0

    Hi Doug

    Thanks for the effort. I tried pasting your code into the field but it seems like it's being ignored. Either way I just get the nodes from the top-level.

    I guess I just have to do without filtering for this project, since the core feature I'm looking for is in place :-)

    /Jan

  • Marco Lusini 176 posts 1370 karma points
    Mar 31, 2010 @ 14:43
    Marco Lusini
    2

    Hi Jan, I'm sorry but, as of now, Tree Muli Picker doesn't support filtering nodes.

    The XPATH expression is only used to dinamically find the root of the tree for selecting nodes.

    I would like to add filtering as a requirement to reach version 1.0, but I don't have any plan for it at the moment.

    Moreover the current implementation of trees in Umbraco is a bit too complex for me and I'll wait for the release of 4.1 before looking at this feature again.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 31, 2010 @ 15:02
    Jan Skovgaard
    0

    Hi Marco

    Thanks for your reply.

    It's ok - I can live with the missing feature. And your picker is very nice! I like it :-) It would just have been very neat. But I think it would be awesome if the different picker could be merged into one somehow.

    I think that the multiple picker already supports filtering. If then there could be added the option of selecting and sorting nodes to it - that would be very awsome. But I can imagine that it would require some time to do etc.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft