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 am following this article to create a custom section in Umbraco: http://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1.aspx.
This is the source code:
[PluginController("CustomSection")] [Umbraco.Web.Trees.Tree("CustomSection", "CustomSectionTree", "My custom section", iconClosed: "icon-doc")] public class CustomSectionTreeController : TreeController { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { var nodes = new TreeNodeCollection(); var item = this.CreateTreeNode(id, "-1", queryStrings, "My item", "icon-truck", true); nodes.Add(item); return nodes;
} protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) { var menu = new MenuItemCollection(); menu.DefaultMenuAlias = ActionNew.Instance.Alias; menu.Items.Add("Create"); return menu; } }
When rendered inside Umbraco back office, I am getting this:
It keeps on adding sub items the more I expand. Any idea what might be going wrong?
Thanks
Hi Bilal,Have you looked into the comments of the blogpost that you are following for bulding this new section in the backofficehttp://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1.aspxTo me it looks like that Alex Burr had the same problem as you are facing now, try to scroll down to the comments of the blogpost. then I think you will get a solution.I havenĀ“t try it myself, but hope this helps,/Dennis
Comment author was deleted
Check https://github.com/TimGeyssens/UmbracoAngularBackofficePages/blob/master/UmbracoAngularBackofficePages/Trees/PeopleTreeController.cs for a more recent version, since that GetTreeNodes method will be called for each node you will a child node under each tree item, so first just check if you are rendering under the main root
{
...
}
True, seems problems no fully solved.
Can you please refer me to an online resource that goes step by step on adding new custom section?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Infinite-level menu items in Tree
Hi,
I am following this article to create a custom section in Umbraco: http://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1.aspx.
This is the source code:
When rendered inside Umbraco back office, I am getting this:
It keeps on adding sub items the more I expand. Any idea what might be going wrong?
Thanks
Hi Bilal,
Have you looked into the comments of the blogpost that you are following for bulding this new section in the backoffice
http://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1.aspx
To me it looks like that Alex Burr had the same problem as you are facing now, try to scroll down to the comments of the blogpost. then I think you will get a solution.
I havenĀ“t try it myself, but hope this helps,
/Dennis
Comment author was deleted
Check https://github.com/TimGeyssens/UmbracoAngularBackofficePages/blob/master/UmbracoAngularBackofficePages/Trees/PeopleTreeController.cs for a more recent version, since that GetTreeNodes method will be called for each node you will a child node under each tree item, so first just check if you are rendering under the main root
{
...
}
True, seems problems no fully solved.
Can you please refer me to an online resource that goes step by step on adding new custom section?
Thanks
is working on a reply...