Reputation: 29186
In an Umbraco site I'm working on, I have a requirement where I need to do the following:
In the "Members" area in Umbraco, there are three content tree nodes:
When the user clicks on any of the above nodes, the default behaviour is the following:
javascript.UmbClientMgr.appActions().openDashboard('member');
What I'd like to do is this - when the user clicks on the Member Groups
node I want to open a new page in the dashboard (not the members
dashboard page as configured in dashboard.config
)
I've seen references to
UmbClientMgr.contentFrame('page.aspx');
in order to open pages in the dashboard, but I can't see how to change the default behaviour of the "Member Groups" node. I've tried editing the record for that node in umbracoAppTree
by changing the action
column to:
openDashboard('testing123')
and then hovering the mouse of the node to see if the above action appears in the JavaScript link, but that did not appear.
Can someone suggest how I can change the Member Groups
link so that it opens a new page in dashboard please?
Upvotes: 1
Views: 477
Reputation: 29186
In my solution I have a custom LoadMemberGroups class, which replaces Umbraco's default loadMemberGroups class (I do this by editing the umbracoAppTree
table and changing the treeHandlerAssembly
and treeHandlerType
columns for the existing loadMemberGroups
entry).
I didn't realise that in my code I can set the action
for the Member Groups
node like this:
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
rootNode.Action = "MyAction";
}
So I can change the action to whatever I need. Cool.
Upvotes: 2