'post'=>'post/index', 'post/(:any)' => 'post/view/$1',if two routers than how to create link, also when this routers not exists also work fine.
echo Router::get(); \Uri::create() is for controller actionhow can i do ?
'post'=>array('post/index','name'=>'post'),
'post/(:any)' => array('post/view/$1','name'=>'post_view'),//this one how to create link?
<?php echo Router::get('post');?><br>
<?php echo Router::get('post_view','jj');?><br>
it is show
http://t.com/post.html [url=http://t.com/post/(:any]http://t.com/post/(:any[/url]).htmlbut when i visite http://t.com/post.html it is show 404 if http://t.com/post/index.html it work fine.
url_suffix=''why link has
.html
'post/:title' => array('post/view','name'=>'post_view'),
<?php echo Router::get('post_view',array('title'=>'test'));?><br>
this is work.
is there any comm router ?'post'=>array('post/index','name'=>'post'),
when i visit post.html not work.return array(
'_root_' => 'home/index', // The default route
'_404_' => 'welcome/404', // The main 404 route
'admins'=>'admin/home/index',
'(:any)!' => 'home/user/$1',
'post_view/:title' => array('post/view','name'=>'post_view'),
'post'=>array('post/index','name'=>'post'),
);
'post-:title' => array('post/view','name'=>'post_view'),
not support // for a route: 'post-:title' => array('post/view','name'=>'post_view'), use
echo Router::get('post_view', array('title','this-is-the-title-of-the-post');
// will echo }http://yoursite/post-this-is-the-title-of-the-post"
<?php echo Router::get('post_view',array('title'=>'test'));?><br>
'post-:title' => array('post/view','name'=>'post_view'),
not work..It looks like you're new here. If you want to get involved, click one of these buttons!