I've been trying to make a submenu widget which shows the children of the current page you're on. However, the menu doesn't show.
This code is in my widget template:
<% if SubNav %> Test <ul> <% control Children %> <% control Menu(2) %> <li><a href="$Link">$MenuTitle</a></li> Test <% end_control %> <% end_control %> </ul> <% end_if %>
The widget consists of two options, which can be en- or disabled via the CMS. The enabling and disabling works, that's why i've got the "Test" line in my code. But the menu doesn't show up. I've tried several combinations of control Children, control Menu() and whatnot, but to no avail.
I've got a hunch that tells me the widget doesn't have "access" to the SiteTree and therefor cannot get the children of the current page, is that correct? If yes, how do i alter that?
Thanks in advance!