How can we hide the notifications option from the actions menu?
When you go into a content node, the top right corner has an actions menu. I would like to completely hide the "Notifications" menu item from this actions menu, as I feel that may confuse some writers / editors while working. What would be the easiest way to remove it from the menu?
Within my en_us.xml file i see...
<key alias="notify">Notifications</key>
But unsure if this is a starting point.
Also... I tried implementing the following class and building my project again, but no luck....
using System.Linq;
using Umbraco.Web.Trees;
namespace umb04.CustomClasses
{
public class RemoveActionMenuItems
{
private void ContentTreeController_MenuRendering(TreeControllerBase sender, MenuRenderingEventArgs e)
{
e.Menu.Items.Remove(e.Menu.Items.Where(x => x.Alias == "notify").FirstOrDefault());
}
}
}
Thank you that worked! Where can I learn about other commands (other than ContentTreeController) in which I can use within the protected override void function? This is all new to me, but I'm learning.
In general most of the time everything is in OnStarted (unless you are doing something advanced) and in general you will probably find yourself using the content events a lot. - because they happen when content is published.
How can we hide the notifications option from the actions menu?
When you go into a content node, the top right corner has an actions menu. I would like to completely hide the "Notifications" menu item from this actions menu, as I feel that may confuse some writers / editors while working. What would be the easiest way to remove it from the menu?
Within my en_us.xml file i see...
But unsure if this is a starting point.
Also... I tried implementing the following class and building my project again, but no luck....
Using Umbraco 7.6.6.
Thanks for any advice!
Hi
the second method (the class) will work if you put it into an Application Handler and register for the Menu Rendering event.
Thank you that worked! Where can I learn about other commands (other than ContentTreeController) in which I can use within the protected override void function? This is all new to me, but I'm learning.
Thanks again!
Hi
the documentation has an overview of the application Event Handler events
https://our.umbraco.org/Documentation/Reference/Events/Application-Startup
and there is some documentation about events too
https://our.umbraco.org/documentation/Reference/Events/
In general most of the time everything is in OnStarted (unless you are doing something advanced) and in general you will probably find yourself using the content events a lot. - because they happen when content is published.
is working on a reply...