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

extending menu controller


Go to End


2 Posts   1981 Views

Avatar
widoczni.pl

Community Member, 9 Posts

19 March 2008 at 12:46am

I'd like to extend menu controller by adding the function to modify my links:
function myLink() {
return $this->Link() . "?fv=".$_GET['fv'];
}

I've added it now to: class Page_Controller extends ContentController
the value of $myLink variable shows now on the page but still have empty value
withing menu (take a look below):
<% control Menu(2) %>
$newLink
<% end_control %>

what should I do to get value of $newLink within control Menu(2) ??

thanks in advance

Avatar
(deleted)

Community Member, 473 Posts

19 March 2008 at 7:23am

Your function is myLink(), so why are you using $newLink?