Copied to clipboard

Flag this post as spam?

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


  • Ben Dickman 15 posts 97 karma points
    25 days ago
    Ben Dickman
    0

    Restrict editor service content picker to specific doc type

    Hi all,

    I have the following code which loads the content picker using the editor service, this is working apart from I am currently able to pick any item in the tree.

    I would like to be able to restrict this to a specific doc type. I know this is possible as I done this when using the multi node tree picker, I just can't seem to find the configuration option.

    my function that I call from my custom grid editor:

    $scope.showContentPickerDialog = function () {
    
                var options = {
                    multiPicker: true,
                    submit: function (value) {
                        $scope.model.selections = value.selection;
                        editorService.close();
                    },
                    close: function () {
                        editorService.close();
                    }
                }
    
                editorService.contentPicker(options);
            }
    

    Any ideas?

    Thanks in advance,

    Ben

  • Lucas Michaelsen 14 posts 148 karma points
    24 days ago
    Lucas Michaelsen
    100

    Hey Ben, Heree is some options you are looking for :)

    var options = {
         multiPicker: true,
         submit: function() {},
         close: function() {},
         filter: 'doctypeAlias', // allows only that doctypee to be picked
         startNode: {
              id: -1, // Start node ide
              query: '', // xpath options
         }
    }
    
  • Ben Dickman 15 posts 97 karma points
    22 days ago
    Ben Dickman
    0

    Hey Lucas,

    the 'filter' option did the job!

    thank you,

Please Sign in or register to post replies

Write your reply to:

Draft