Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

2.2.3: $Top in templates not working - bug in SSViewer


Go to End


1535 Views

Avatar
schellmax

Community Member, 126 Posts

6 December 2008 at 8:54am

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