Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » 2.2.3: $Top in templates not working - bug in SSViewer

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 922 Views
  • schellmax
    Avatar
    Community Member
    126 Posts

    2.2.3: $Top in templates not working - bug in SSViewer Link to this post

    hi,
    i just discovered that in version 2.2.3 (a fresh install) the $Top property is not working.
    Example code (put in themes\blackcandy\templates\Page.ss):

    $Title //returns page title
    <% control Menu(1) %>
    $Top.Title //returns nothing
    <% end_control %>


    In SSViewer.php i came across an interesting line (204):

    SSViewer::$topLevel = null;


    Commenting this line out makes $Top working again, as some lines before that one (148), $topLevel is properly set.

    I'm not upgrading from an older version currently, but i can imagine this causing real trouble. Can anyone confirm it's a very bug? Oder did i miss something?
    cheers
    max

    922 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.