Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » extending menu controller

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

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

Page: 1
Go to End
Author Topic: 1573 Views
  • widoczni.pl
    Avatar
    Community Member
    9 Posts

    extending menu controller Link to this post

    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

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: extending menu controller Link to this post

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

    1573 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.