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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Simple Page_Controler Function giving 404?

Go to End

2 Posts   731 Views


Community Member, 125 Posts

11 June 2010 at 7:46am

Hi all

in my /mysite/code/page.php
i have

 class Page_Controller extends ContentController { 

public function  MobileOff(){

but when I navigate to it gives me a page cannot be found.
What am I missing?


Forum Moderator, 5521 Posts

11 June 2010 at 7:28pm

Well because out of the box the URL rules will match that to a Page. To do that you would have to use the url

And make sure its an allowed action.