Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Jun 13, 2019 @ 12:38
    Ismail Mayat
    0

    I have the following treecontroller:

    [Tree("settings", "examine",
        TreeGroup = "examine",
        TreeTitle = "ExamineInspector", SortOrder = 35)]
    [PluginController("ExamineInspector")]
    public class ExamineInspectorTreeController : TreeController
    

    When i open the item in the tree the route its trying to hit is:

    /App_Plugins/ExamineInspector/backoffice/examine/dashboard.html
    

    My stuff lives in

    /App_Plugins/ExamineInspector/examine/dashboard.html
    

    Is there a way to customise the route so i can replace the backoffice part?

    Regards

    Ismail

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Jun 13, 2019 @ 12:48
    Paul Seal
    0

    Hi Ismail

    Do you have it in the package manifest file like this:

      {
        "dashboards":  [
            {
                "alias": "myCustomDashboard2",
                "view":  "/App_Plugins/myCustom/dashboard.html",
                "sections": [ "content", "settings" ],
                "weight": -10,
                "access": [
                    { "grant": "translator" }               
                ]
            }
        ]
    }
    

    Or you can do it in C# like this:

      [Weight(-10)]
        public class MyDashboard : IDashboard
        {
            public string Alias => "myCustomDashboard";
    
            public string[] Sections => new[] { "content", "settings" };
    
            public string View => "/App_Plugins/myCustom/dashboard.html";
    
            public IAccessRule[] AccessRules => Array.Empty<IAccessRule>();
        }
    

    All code sourced from Dave's CodeGarden 19 presentation slides https://gitpitch.com/dawoe/building-gr8-packages#/32

    Cheers

    Paul

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Jun 13, 2019 @ 12:50
    Ismail Mayat
    0

    Its using tree controller, so i used to have it as IDashboard, i was also using in angular the umb-sub-view directive, however that was nuking the other tabs like examine management. So i swapped to a tree like how usync8 does it. However I already have a folder stucture for everything so was wondering if there was a way for just that controller to chagne the route.

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Jun 13, 2019 @ 12:52
    Paul Seal
    0

    Oh I see, sorry, I'm not sure, maybe Kevin can help then.

Please Sign in or register to post replies

Write your reply to:

Draft