Copied to clipboard

Flag this post as spam?

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


  • madonna Ibrahim 2 posts 72 karma points
    Aug 21, 2024 @ 13:07
    madonna Ibrahim
    0

    Need Help with Custom Menu Action Not Redirecting in Umbraco Custom Tree

    Hi everyone,

    I'm new to Umbraco and working on a custom tree. I'm trying to create a custom action for a menu item on any tree node to open another dashboard when clicked, but it doesn't seem to redirect as expected. Here's the code I'm using:

    var createMenuItem = new MenuItem
    {
        UseLegacyIcon = false,
        Name = "Create",
        Icon = "icon-add",
        SeparatorBefore = true,
        OpensDialog = false,
    };
    
    // Set URL to redirect to the Razor view
    createMenuItem.AdditionalData["actionUrl"] = "/umbraco/backoffice/plugins/api/v1/CustomForms";
    createMenuItem.AdditionalData.Add("actionUrlMethod", "Inline");
    
    menu.Items.Add(createMenuItem);
    menu.Items.Add(new RefreshNode(LocalizedTextService, true));
    

    Can anyone help me figure out why it's not redirecting to this action? Thanks!

  • 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