Copied to clipboard

Flag this post as spam?

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


  • Arun 144 posts 407 karma points
    Mar 09, 2020 @ 06:16
    Arun
    0

    Use custom Context Menu

    I was trying to insert a custom context menu in Umbraco 7.

    Is it possible to use custom Context Menu.?
    How.?
    Any help is appreciated

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Mar 09, 2020 @ 07:25
    Shaishav Karnani from digitallymedia.com
    0

    Hi Arun,

    Are you looking to add item to existing Context Menu?

    Cheers,

    Shaishav

  • Arun 144 posts 407 karma points
    Mar 17, 2020 @ 03:40
    Arun
    100

    Hi Shaishav,
    I got the solution : )
    I created a class RegisterEvents as below

    enter image description here

  • Markus Johansson 1945 posts 5899 karma points MVP 2x c-trib
    Mar 17, 2020 @ 06:56
    Markus Johansson
    1

    Hi Arun!

    I’m a little bit late to the party since you’ve already solved the issue. Umbraco calls these “Tree Actions”, or just IAction, figured I’ll share a link to the documentation as well: https://our.umbraco.com/Documentation/Extending/Section-Trees/tree-actions-v8

    Turns out that the docs actually should be extended to include an example on how to add a item “on the fly” like you needed to.

    Edit: Turns out this was already there: https://our.umbraco.com/Documentation/Extending/Section-Trees/trees-v7#menurendering

    I’ve a similar thing going on here: https://github.com/enkelmedia/Umbraco-MultiMover/blob/master/MultiMover/Startup/AddNodeMoverActionEventHandler.cs

    One question, the last row in your code umbraco.library.RefreshContent(), are you sure that’s needed? What does it do?

    Cheers!

  • Arun 144 posts 407 karma points
    Mar 17, 2020 @ 08:15
    Arun
    0

    Thank you Markus for sharing these details here : )

    I've gone through this documentation and got the solution

  • Markus Johansson 1945 posts 5899 karma points MVP 2x c-trib
    Mar 17, 2020 @ 10:54
    Markus Johansson
    0

    =D

    Just wanted to know, what does umbraco.library.RefreshContent() do? Is it really needed?

  • Arun 144 posts 407 karma points
    Mar 18, 2020 @ 04:01
    Arun
    0

    No, it's not

    I have to pick root nodes as part of my functionality that's why i used it and Forget to remove here.!

    Thanks Markus :)

  • Thomas 319 posts 606 karma points c-trib
    Jan 13, 2021 @ 13:31
    Thomas
    0

    Is there a way to add/remove/edit this list in a event ?

    enter image description here

  • 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