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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   953 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.