| 1 |
lars |
1 |
<?php
|
|
|
2 |
/* SVN FILE: $Id: routes.php 7945 2008-12-19 02:16:01Z gwoo $ */
|
|
|
3 |
/**
|
|
|
4 |
* Short description for file.
|
|
|
5 |
*
|
|
|
6 |
* In this file, you set up routes to your controllers and their actions.
|
|
|
7 |
* Routes are very important mechanism that allows you to freely connect
|
|
|
8 |
* different urls to chosen controllers and their actions (functions).
|
|
|
9 |
*
|
|
|
10 |
* PHP versions 4 and 5
|
|
|
11 |
*
|
|
|
12 |
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
|
|
13 |
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
14 |
*
|
|
|
15 |
* Licensed under The MIT License
|
|
|
16 |
* Redistributions of files must retain the above copyright notice.
|
|
|
17 |
*
|
|
|
18 |
* @filesource
|
|
|
19 |
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
20 |
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
|
|
21 |
* @package cake
|
|
|
22 |
* @subpackage cake.app.config
|
|
|
23 |
* @since CakePHP(tm) v 0.2.9
|
|
|
24 |
* @version $Revision: 7945 $
|
|
|
25 |
* @modifiedby $LastChangedBy: gwoo $
|
|
|
26 |
* @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
|
|
|
27 |
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
|
|
28 |
*/
|
|
|
29 |
/**
|
|
|
30 |
* Here, we are connecting '/' (base path) to controller called 'Pages',
|
|
|
31 |
* its action called 'display', and we pass a param to select the view file
|
|
|
32 |
* to use (in this case, /app/views/pages/home.ctp)...
|
|
|
33 |
*/
|
| 17 |
lars |
34 |
Router::connect('/', array('controller' => 'posts', 'action' => 'index'));
|
| 1 |
lars |
35 |
/**
|
|
|
36 |
* ...and connect the rest of 'Pages' controller's urls.
|
|
|
37 |
*/
|
|
|
38 |
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
|
|
39 |
?>
|