Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 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);

              }

            }

      }

Please Sign in or register to post replies

Write your reply to:

Draft