Copied to clipboard

Flag this post as spam?

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


  • Peter Kongyik 28 posts 170 karma points
    Mar 18, 2015 @ 02:44
    Peter Kongyik
    0

    Custom section: mark currentNode blue

    Hi guys!

    I've extended my umbraco backoffice with a custom section, but I cannot make the current node get highlighted in the tree area with a blue background. This works perfectly in the built-in sections: the current node gets blue, even a page refresh re-selects the current node.


    Basically my code refers to the right side of the page, the dashboard (angular controlelr and html view). To the left I have minimal influence, only my TreeController by setting the nodes for the expanded nodes (with proper ids). However umbraco is not willing to make my node blue.

    What am I missing?

    thanks in advance,
    Peter

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 18, 2015 @ 05:08
    Jan Skovgaard
    0

    Hi Peter

    Any chance you can share your code? It can probably make it easier to give you some suggestions if this is possible at all.

    /Jan

  • Sören Deger 733 posts 2844 karma points c-trib
    Mar 18, 2015 @ 05:13
    Sören Deger
    102

    Hi Peter,

    you should use the navigationService in your angularJS controller for mark the current Node. This code do this for me:

    navigationService.syncTree({ tree: 'myCustomTreeAlias', path: ["-1", $routeParams.id], forceReload: false });

    And here you can find the documentation:

    http://umbraco.github.io/Belle/#/api/umbraco.services.navigationService

     

    Hope this helps.

     

    Cheers,

    Sören

  • Peter Kongyik 28 posts 170 karma points
    Mar 18, 2015 @ 09:58
    Peter Kongyik
    0

    Thank you guys for your feedback! Sören, that's exactly what I needed, works like a charm!

  • Sören Deger 733 posts 2844 karma points c-trib
    Mar 18, 2015 @ 10:08
    Sören Deger
    0

    Hi Peter,

     

    great that I could help you :-)

     

    Cheers,

    Sören

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies