Reputation: 642
How do I connect to a view in a subfolder in cakephp 1.3? If I organize folders in my Views like:
Views/my_folder/my_subfolder/mypage.ctp
How do I connect to the mypage.ctp view in routes? I've tried the following:
Router::connect('/my_folder/my_subfolder/mypage',
array('controller' => 'my_folder', 'action' => 'mypage'));
The above does not work. Is there a different way to write the connection in routes.php?
I want the url to be: www.mysite.com/my_folder/my_subfolder
Upvotes: 1
Views: 1233
Reputation: 3451
Please check it
Router::connect( '/foldername', array('controller' => 'controllername', 'action' => 'functionname'));
Upvotes: 0
Reputation: 747
the Pages
controller looks for views in Views/Pages
so move your mypage.ctp
there.
The structure of Views
folder is guided by conventions, mapping from url to controller+action is the only thing that you change via routes.
Upvotes: 1