Copied to clipboard

Flag this post as spam?

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


  • Topic author was deleted

    Jan 07, 2014 @ 16:53

    Filtering a Tree via DialogService

    I'm safely able to interact with the dialogService.treePicker() however there appears no hooks to be able to filter out undesireable document types.   

    i.e. when specifying the 'content' tree with a startNodeID, you get the whole sub-tree.

    http://umbraco.github.io/Belle/#/api/umbraco.services.dialogService#treePicker

    It is possible to create a custom tree and point the dialog service to that however I think it would be way more efficient to allow for filtering of current trees (content, media, members).

    I have created a feature request to be able to pass an optional white/blacklist of docType aliases.

    http://issues.umbraco.org/issue/U4-3965

    If anyone knows of a way around this ahead of time, it'd be appreciated :)

    Cheers,

    kg

     

  • Jörg Seibert 10 posts 61 karma points
    Aug 20, 2014 @ 20:05
    Jörg Seibert
    0

    I had similar issues regarding filtering a tree for media. Multinode Treepicker does filtering and after peeking in the js files I've been able to get some filtering (whitelisting) done:

    // Add new link to media

    $scope.add = function() {

        dialogService.treePicker(

          { multiPicker: multiPicker,

            entityType: 'Media',

            filterCssClass: 'not-allowed not-published',

            startNode: { type: 'media', query: '' },

            filter: $scope.model.config.filterItems, //'Image, YouTubeReference',

            treeAlias: 'media',

            section: 'media',

            callback: function(data) { ... }

    }); };

    hth

     J.

Please Sign in or register to post replies

Write your reply to:

Draft