Copied to clipboard

Flag this post as spam?

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


  • Streety 358 posts 568 karma points
    Jan 25, 2018 @ 18:06
    Streety
    0

    Custom Treenodes not being styled correctly.

    When selecting my custom treenode, the selected node is not being highlighted (styled with a different backcolour as is Umbraco default). enter image description here

    In the picture (above) the Strava Mass Emailer object is selected. The correct route and html is shown, but the tree item is not highlighted.

    However when I "navigationService.syncTree" after I create a new child node, this DOES get the styling class. However clicking another node doesn't remove the styling.

    It looks like the class in question is :

    .umb-tree li.current>div a
    

    If I select one of my nodes, it is not getting the ".current" classname appended and thus not applying the style.

    Is this a bug?

  • Streety 358 posts 568 karma points
    Feb 01, 2018 @ 09:43
    Streety
    0

    Bueller!

  • Liebherr574 1 post 71 karma points
    Feb 08, 2018 @ 11:25
    Liebherr574
    0

    With Umbraco 7.5

    in my case (display webform page), i use on Page_load :

     new Umbraco.Web.UI.Pages.ClientTools(this).SyncTree(Request.QueryString["path"],false);
    

    or in Js

    UmbClientMgr.mainTree().syncTree(path, false);
    

    I make Path in GetTreeNodes(string id, FormDataCollection queryStrings)

    TreeNode TrNode = CreateTreeNode(Chapter.Id.ToString(), id, queryStrings, Chapter.Name, "icon-utilities", HashChild);
    TrNode.Path = id + "," + Chapter.Id; // easy for two level
    

    Path is passed to display Page in URL

    string.Format("/umbraco/Views/MyCustomApp/Read.aspx?id={0}&path={1}", Chapter.Id, TrNode.Path)
    
  • Streety 358 posts 568 karma points
    Feb 08, 2018 @ 12:11
    Streety
    0

    Hmmm, Thanks for that...

    I am not sure we are talking about the same things, my treenodes work just fine.

    However the class .current is not being appended to the current li. I suspect this is a function beyond our control.

    If I could get access to the node JS I could toggle the class, but the tree is dynamically created

Please Sign in or register to post replies

Write your reply to:

Draft