Copied to clipboard

Flag this post as spam?

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


  • Amigo 231 posts 506 karma points
    Apr 04, 2014 @ 03:11
    Amigo
    0

    context menu

    Im trying to add items to context menu in umbraco 6.1.6, but the examples i find online is not working.
    can anyone tell me why?

    public class TreeEvent : ApplicationBase

        {

            public TreeEvent()

            {

                BaseTree.BeforeNodeRender += new BaseTree.BeforeNodeRenderEventHandler(this.BaseTree_BeforeNodeRender);     

            }

     

            private void BaseTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)

            {

              if (node.Menu != null)

              {

                 // node.Menu.Insert(0, new TestAction());

                  node.Menu.Insert(1, umbraco.BusinessLogic.Actions.ContextMenuSeperator.Instance);

                  node.Menu.Insert(2, umbraco.BusinessLogic.Actions.ContextMenuSeperator.Instance);

                  node.Menu.Insert(3, umbraco.BusinessLogic.Actions.ContextMenuSeperator.Instance);

              }

            }

      }

  • 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