Copied to clipboard

Flag this post as spam?

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


  • zell 37 posts 90 karma points
    May 20, 2016 @ 05:15
    zell
    0

    Custom Content Picker with filter

    Hi, i'm trying to reuse the content picker but build in additional functionality bespoke to my solution. i'm displaying the content tree but i'm unsure how to apply a filter, i.e. i've added in the field from the current multi tree picker allowing to apply a filter of node types but i'm unsure how to implement it.

    i'm displaying the tree in my html like this:

                    <p>Browse Content</p>
                    <umb-tree section="content"
                              hideheader="true"
                              hideoptions="true"
                              eventhandler="dialogTreeEventHandler">
                    </umb-tree>
    

    searching through the git repo i notice in the content picker you have properties such as

    dialogOptions.filterCssClass = "not-allowed not-published";

    how can i implement this into my solution? i've been struggling with this for a while now. not worked it out yet.

    many thanks in advance.

  • zell 37 posts 90 karma points
    May 20, 2016 @ 05:42
    zell
    1

    you know, i've figured out .. as always.. i turn to the forum just before i figure it out.

    anyway - i'll leave this ticket here for others who may stumble across this.. but simply review this controller: https://github.com/umbraco/Umbraco-CMS/blob/75c2b07ad3a093b5b65b6ebd45697687c062f62a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.controller.js

    https://github.com/umbraco/Umbraco-CMS/blob/75c2b07ad3a093b5b65b6ebd45697687c062f62a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.html

    area to review: function nodeExpandedHandler(ev, args) { debugger; //iterate children if (angular.isArray(args.children)) { _.each(args.children, function(child) {

                });
                //check filter
                performFiltering(args.children);
            };
        };
    
Please Sign in or register to post replies

Write your reply to:

Draft