You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cammanderson edited this page Sep 13, 2011
·
1 revision
Routing provides you the ability to map certain urls to request parameters and different URL's that exist in the CMS. This helps you create much friendlier looking URL's or even redirect to different pages/controllers.
Background
The simplest way to handle passing variables around through URL's is using the GET request (e.g. my-page/example?id=1). This often is the fastest way to have information transferred in the URL for processing in your request.
Using Routing for CMS Pages
Using Symfony2 Router, you can add to a routing.yml to create a new named route. This will contain the information about the URL and how to map parameters.
Importantly, you want to set the defaults to call the default controller for rendering pages, and you need to specify the {url}.