Copied to clipboard

Flag this post as spam?

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


  • Dennis 33 posts 238 karma points
    Feb 17, 2016 @ 10:06
    Dennis
    0

    Implement SortAction in custom section

    I have created a custom section, and everything works great!

    I have implemented the menu this way:

    protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
            {
                var menu = new MenuItemCollection();
    
                if (id == Constants.System.Root.ToInvariantString())
                {
                    menu.Items.Add<ActionNew>("Opret");
                    menu.Items.Add<ActionRefresh>("Opdater");
                }
    
                int idAsInt;
                if (int.TryParse(id, out idAsInt) && idAsInt > 0)
                {
                    menu.Items.Add<ActionDelete>("Slet");
                    menu.Items.Add<ActionSort>("Sorter");
                }
    
                return menu;
            }
    

    My problem is I would like to sort my collection. The correct view is called I have an angular controller ready. Does anyone know how I can make a drag and drop sort function up running. I can't figure out how to use the one shipped with Umbraco?

Please Sign in or register to post replies

Write your reply to:

Draft