Copied to clipboard

Flag this post as spam?

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


  • Robert Graham 22 posts 90 karma points
    Dec 02, 2015 @ 14:48
    Robert Graham
    0

    Legacy Tree Problem Latest Version 7 Umbraco

    Hi,

    Posted about this before but did not get any response. Trying again with the hope someone has worked on this.

    I am trying to port over some existing .net forms work that was carried out for a client to the newest version of Umbraco 7.

    I have just installed a new test site from scratch this morning.

    The simple problem being that I cannot get my custom tree title to appear at the top of the tree menu.

    See below Image

    Hear is my code. I have also dug around in the Umbraco source to see how the User sections does it as it is still using asp.net forms. Can't find a reason why this would not work for my custom section.

    [umbraco.businesslogic.Tree("account", "accountTree", "Client Accounts")]
    public class MyLegacyTree : umbraco.cms.presentation.Trees.BaseTree
    {
        public MyLegacyTree(string application) : base(application) { }
    
        protected override void CreateRootNode(ref XmlTreeNode rootNode)
        {
            rootNode.Icon = FolderIcon;
            rootNode.OpenIcon = FolderIconOpen;
            rootNode.NodeType = "init" + TreeAlias;
            rootNode.NodeID = "init";
        }
    
        public override void RenderJS(ref StringBuilder Javascript)
        {
            Javascript.Append(
                @"
                function openUser(id) {
                    UmbClientMgr.contentFrame('users/mypagefordoingstuff.aspx?id=' + id);
                }
                ");
        }
    
        protected override void CreateAllowedActions(ref List<IAction> actions)
        {
            actions.Clear();
            actions.Add(ActionDisable.Instance);
        }
    
        public override void Render(ref XmlTree tree)
        {
            for (int i = 97; i < 123; i++)
            {
                XmlTreeNode xNode = XmlTreeNode.Create(this);
                xNode.NodeID = "letter_" + id.ToString();
                xNode.Text = ((char)i).ToString();
                xNode.Icon = FolderIcon;
                xNode.OpenIcon = FolderIcon;
                xNode.Source = this.GetTreeServiceUrl("letter_" + id.ToString());
                tree.Add(xNode);
            }
        }
    }
    
    
    
    [Application("account", "account", "traymember", 16)]
    public class AccountSectionApplication : IApplication
    {
    }
    

    What I believe I should see is Client Accounts. Can't for the life of me work out why it is not working though. No obvious javascript errors etc....

    Fingers crossed someone can see what is going on or if there is a bug in Umbraco perhaps.

    This legacy support is vital for clients who have previously invested heavily in the customisation of Umbraco.

    Thanks

    Rob

  • Comment author was deleted

    Dec 02, 2015 @ 15:29

    Looks like a bug don't see any issues with your code...

  • Robert Graham 22 posts 90 karma points
    Dec 02, 2015 @ 15:38
    Robert Graham
    0

    Thanks Tim.

    Is there a plan to keep supporting different web technologies within the back office of Umbraco?

    With the Iframe approach there really is no barriers to what can be achieved via the back office and this can in many cases reduce the cost to clients with regard customisation.

    I am about to make a recommendation about how best to proceed to a client and they are not going to be happy at all if we can't re-use back office work that they have paid for. Using Angular etc should be a choice not a requirement in my mind. Iframe approach lets everyone decide that I guess.

    Thanks

    Rob

  • Robert Graham 22 posts 90 karma points
    Dec 04, 2015 @ 14:00
    Robert Graham
    0

    Quick update to the issue.

    If you add two trees then the title appears.

    This is a bug with single tree menus only.

    Would be good to get some input Tim to the iframe support going forward please.

    How best do I raise the bug?

    Many thanks

    Rob

  • Comment author was deleted

    Dec 04, 2015 @ 14:15

    Best is to report it on http://issues.umbraco.org/dashboard

    Don't think the support will go away in v7 since a lot of the core pages are still aspx. v8 is another story

  • Robert Graham 22 posts 90 karma points
    Dec 04, 2015 @ 14:35
    Robert Graham
    0

    Thanks.

    I don't mind if the old web controls (umbraco tab etc) get deprecated - makes sense since you are moving away from forms in the back office, but I really feel given the number of web technologies out there, payment gateway hosted pages etc etc that a proper, non legacy way of supported Iframe usage in the back office would help a load of people.

    If the tree creation needs to be re-factored going forward then again that is fine - but the bit in the middle should be technology agnostic. The tree node should simply have a property on it that tells the core to create the iframe and accept the provided url path on the node. Dead easy and would be brilliant.

    Where can I request this functionality be requested for v8?

    Also, I was digging around in the source code for Umbraco and was wondering if there was anywhere that explains how to set up and debug the source?

    Ta

    Rob

Please Sign in or register to post replies

Write your reply to:

Draft