Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi I was just wondering if it's possible to use the Tree attribute and inherit from BaseTree to then append an admin node to an existing tree?
I'd like to add one to the end of the uCommerce tree so I tried:
[Tree("uCommerce", "uc_orderexport", "Order Export", sortOrder: 100)] public class OrderExportTree : BaseTree { public OrderExportTree(string application) : base(application) { } public override void Render(ref XmlTree tree) { var exportNode = XmlTreeNode.Create(this); exportNode.NodeID = "uc_export"; exportNode.Action = "javascript:openOrderExportPage();"; exportNode.Icon = "../../../App_Plugins/UmbracoBackoffice/Icons/export_pastiche_order.png"; exportNode.OpenIcon = "../../../App_Plugins/UmbracoBackoffice/Icons/export_pastiche_order.png"; exportNode.HasChildren = false; exportNode.Menu = new List<IAction>(); OnBeforeNodeRender(ref tree, ref exportNode, EventArgs.Empty); if(exportNode != null) { tree.Add(exportNode); OnAfterNodeRender(ref tree, ref exportNode, EventArgs.Empty); } } protected override void CreateRootNode(ref XmlTreeNode rootNode) { } public override void RenderJS(ref System.Text.StringBuilder Javascript) { Javascript.Append( @"function openOrderExportPage() { UmbClientMgr.contentFrame('/UmbracoBackoffice/DataExportSurface/Index); }"); } }
With no luck
is this possible?
Have a look at the source of the Config Tree package. That adds a tree to the settings section.
https://github.com/leekelleher/umbraco-config-tree
Jeroen
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco v6 Appending Item to Existing Tree?
Hi I was just wondering if it's possible to use the Tree attribute and inherit from BaseTree to then append an admin node to an existing tree?
I'd like to add one to the end of the uCommerce tree so I tried:
With no luck
is this possible?
Have a look at the source of the Config Tree package. That adds a tree to the settings section.
https://github.com/leekelleher/umbraco-config-tree
Jeroen
is working on a reply...