pictcode / lib / Cake / Console / Templates / skel / Config / routes.php @ 00f32066
履歴 | 表示 | アノテート | ダウンロード (1.118 KB)
| 1 | 635eef61 | spyder1211 | <?php
 | 
      
|---|---|---|---|
| 2 | /**
 | 
      ||
| 3 |  * Routes configuration
 | 
      ||
| 4 |  *
 | 
      ||
| 5 |  * In this file, you set up routes to your controllers and their actions.
 | 
      ||
| 6 |  * Routes are very important mechanism that allows you to freely connect
 | 
      ||
| 7 |  * different URLs to chosen controllers and their actions (functions).
 | 
      ||
| 8 |  *
 | 
      ||
| 9 |  * @link          http://cakephp.org CakePHP(tm) Project
 | 
      ||
| 10 |  * @package       app.Config
 | 
      ||
| 11 |  * @since         CakePHP(tm) v 0.2.9
 | 
      ||
| 12 |  */
 | 
      ||
| 13 | |||
| 14 | /**
 | 
      ||
| 15 |  * Here, we are connecting '/' (base path) to controller called 'Pages',
 | 
      ||
| 16 |  * its action called 'display', and we pass a param to select the view file
 | 
      ||
| 17 |  * to use (in this case, /app/View/Pages/home.ctp)...
 | 
      ||
| 18 |  */
 | 
      ||
| 19 | Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));  | 
      ||
| 20 | /**
 | 
      ||
| 21 |  * ...and connect the rest of 'Pages' controller's URLs.
 | 
      ||
| 22 |  */
 | 
      ||
| 23 | Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));  | 
      ||
| 24 | |||
| 25 | /**
 | 
      ||
| 26 |  * Load all plugin routes. See the CakePlugin documentation on
 | 
      ||
| 27 |  * how to customize the loading of plugin routes.
 | 
      ||
| 28 |  */
 | 
      ||
| 29 |         CakePlugin::routes();
 | 
      ||
| 30 | |||
| 31 | /**
 | 
      ||
| 32 |  * Load the CakePHP default routes. Only remove this if you do not want to use
 | 
      ||
| 33 |  * the built-in default routes.
 | 
      ||
| 34 |  */
 | 
      ||
| 35 | require CAKE . 'Config' . DS . 'routes.php';  |