Copied to clipboard

Flag this post as spam?

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


  • Ayo Adesina 419 posts 1001 karma points
    Oct 05, 2017 @ 16:55
    Ayo Adesina
    0

    IAction- How to specify how you display views from a custom menu, custom section

    I have got a custom tree and custom section all working in Umbraco 7.

    In my tree I have a menu Item that allows the user to delete a node. I have set up my view and controller and I am able to delete the nodes.

    This is how I generate the delete menu Item

    menuItemCollection.Items.Add<ActionDelete>("Delete")
    

    When the user clicks on it the delete view is displayed as a slide out.

    By default umbraco looks for the delete view here:

    backoffice/treeName/delete.html
    

    How do I specify the path to my html file so I am not using the default one?

    I have tried this:

     menuItemCollection.Items.Add<ActionDelete>("Delete").NavigateToRoute("/my/path/file.html/");
    

    This works... but the view does not slight out from the side.

    How can I have it work exactly the way it works now but just specify my path to my html view?

  • Ayo Adesina 419 posts 1001 karma points
    Oct 05, 2017 @ 17:17
    Ayo Adesina
    100

    I found the solution experimenting using intelesense:

    For anyone else...

    menuItemCollection.Items.Add<ActionDelete>("Delete").LaunchDialogView("/app_plugins/yourPath.html", "Are you sure?");
    
  • 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