Hi there,
I am desperately trying to get an independent menu on my webpage to work.
Referring to this post:
http://www.silverstripe.org/general-questions/show/5822
I implemented the following in the mysite/code/Page.php:
class Page_Controller extends ContentController {
function Menu3(){
$whereStatement = "ShowInTopMenu = 1";
return DataObject::get("Page", $whereStatement);
}
And in the navigation.ss I have written:
<ul>
<% control Menu3 %>
<li class="$FirstLast $LinkingMode">
<a href="$Link" title="$Title.XML"><span>$MenuTitle.XML</span></a></li>
<% end_control %></ul>
All I get is:
Server error
Sorry, there was a problem with handling your request.
What am I doing wrong?
Any hint would be really appreciated.