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.

All other Modules

Discuss all other Modules here.

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

How Silverstripe URLs work?


Reply

2 Posts   323 Views

Avatar
sapkotamadan

13 November 2012 at 7:14pm Community Member, 2 Posts

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

13 November 2012 at 8:21pm Forum Moderator, 5511 Posts

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.