Copied to clipboard

Flag this post as spam?

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


  • Samah 2 posts 82 karma points notactivated
    Mar 19, 2018 @ 10:39
    Samah
    0

    Shwoing new added "Umbraco.Web.Models.Trees.MenuItem" for administrator only

    Hello , i found this example online and its working

       var i = new Umbraco.Web.Models.Trees.MenuItem("duplicateNode", "Duplicate");
                            //optional, if you dont want to follow conventions, but do want to use a angular view
                            i.AdditionalData.Add("actionView", "/App_Plugins/DuplicateNode/DuplicateNodeView.html");
                            i.Icon = "user-females-alt";
    
                            //insert at index 5
                            if (e.Menu.Items.Count > 5)
                            {
                                e.Menu.Items.Insert(5, i);
                            }
    

    i had tow Cases:

    1-what if i want to show it only for a specific user orset of users.

    2-what if u want to show it only for a specific document type.

Please Sign in or register to post replies

Write your reply to:

Draft