Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » problem in function with $MenuTitle

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: 1077 Views
  • ojalà
    Community Member
    87 Posts

    problem in function with $MenuTitle Link to this post

    I waht to usea function in Page.php to print only 3 entry of $MenuTitle.
    So I use this code:

    function Ciclo_menu()
          $array = $MenuTitle;
          $nuovo_menu = $array[$i];
          return $nuovo_menu;


    something is wrong, is it possible to use $menuTitle varable in Page.php function?

  • Willr
    Forum Moderator
    5511 Posts

    Re: problem in function with $MenuTitle Link to this post

    $MenuTitle would refer to the variable $MenuTitle in that function, you need to refer to the MenuTitle on the 'Object' rather then the function by doing


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.