Copied to clipboard

Flag this post as spam?

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


  • J 447 posts 864 karma points
    Aug 13, 2014 @ 21:32
    J
    0

    Request error: The URL returned a 404 (not found): views/Menu/Menu.html

    I have the below code to create a new section in Umbraco 7.1.*

    [Tree("Menu1", "Menu1", "Menus")]
    [PluginController("Menu")]
    
    public class MenusController : TreeController
    {
        protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
        {
            var nodes = new TreeNodeCollection();
            if (id == "-1")
            {
                var route = string.Format("/App_Plugins/Menu/Somepage.aspx");
    
                nodes.Add(this.CreateTreeNode("dashboard", id, queryStrings, "Items", "icon-server", false, route));
            }
            return nodes;
        }
    
        protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
        {
            var menu = new MenuItemCollection();
            menu.DefaultMenuAlias = ActionNew.Instance.Alias;
            menu.Items.Add<ActionNew>("Create");
            return menu;
        }
    

    But no matter what i try i keep get the following error once i click on the item (in this case its called Items)

    Request error: The URL returned a 404 (not found): views/Menu/Menu.html

    That path doesnt exist but im not sure how its getting that path when i have set the route as Somepage.aspx?

  • J 447 posts 864 karma points
    Aug 14, 2014 @ 17:38
    J
    0

    Anyone? The irritating part is that the documentation is not good at all.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies