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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

How Silverstripe URLs work?


Go to End


2 Posts   690 Views

Avatar
sapkotamadan

Community Member, 2 Posts

13 November 2012 at 7:14pm

I am new to Silverstripe Framework / CMS. I see `./mysite/code/Page.ss` as controller and `./themes/simple/...` as template directory. I logged into the admin panel and added new "test" page. The menu appears on the website with the URL `http://example.com/test` and content is displayed.

So what I want to know is, how to access the new controller let say `Download.ss`. I want to access the URL `http://example.com/download/123/` without adding the new page `download` in admin panel. Thank you.

Avatar
Willr

Forum Moderator, 5523 Posts

13 November 2012 at 8:21pm

See the director class (http://doc.silverstripe.org/framework/en/reference/director), routing in particular will help pointing a url to your controller - http://doc.silverstripe.org/framework/en/reference/director#routing.