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, biapar, Willr, Ingo, swaiba, simon_w

Simple Page_Controler Function giving 404?


2 Posts   610 Views


11 June 2010 at 7:46am Community Member, 125 Posts

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?


11 June 2010 at 7:28pm Forum Moderator, 5511 Posts

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.