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.


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

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

Control scope


21 Posts   6907 Views


13 September 2008 at 11:29pm Community Member, 7 Posts

Hi, we have version 2.2.2 and $Top does not seem to do anything. Can you confirm it still works?

We're trying to build a pretty in depth site ( but without $Top working we're a little stuck.

This is an example that does not work:

<% control Menu(1) %>
<% control children %>
<% end_control %>
<% end_control %>

The $Top.Title displays nothing.

Hope you can help.


13 September 2008 at 11:46pm Forum Moderator, 5511 Posts

Maybe $top is in trunk or removed.. you can do <% control Level(1) %>$Title<% end_control %. to get the topmost then


15 September 2008 at 8:15pm Community Member, 7 Posts

Thanks for such a speedy reply, that does indeed allow me to reference built in values.

I was hoping it would give me the context of the ContentController, so I can call functions.

I'm trying to call functions as I would normally do before entering into the scope of a 'control', but it seems this is only possible before you use a 'control' block.

Is there another way I can reference functions of the ContentController once we're inside a 'control'? This is really important to the sites we build and severely limiting if this is not possible.



15 September 2008 at 9:47pm Community Member, 787 Posts

try placing your functions in the Page class instead of the controller class.

That often makes the methods reachable ...


15 September 2008 at 11:35pm Community Member, 7 Posts

Aha, have got the $Top working! I just downloaded the latest nightly build and it works as I'd hoped, hoorah!

I was relying on the latest stable build 2.2.2 which it seems has lost that feature.