<?php<br />return array(
'_root_' => 'welcome/index',
'_404_' => 'welcome/404',
'sat/(:categoria)/lista' => 'sat/index/$1', // categoria N1
'sat/(:categoria)/(:subcategoria)/lista' => 'sat/index/$1/$2', // categoria N2
'sat/(:categoria)/(:subcategoria)/(:subsubcategoria)/lista' => 'sat/index/$1/$2/$3', // categoria N3
'sat/(:video)/video' => 'video/index/$1', // Detalle video sin cateogorias
'sat/(:categoria)/(:video)/video' => 'video/index/$2/$1', // Detalle video en N1
'sat/(:categoria)/(:subcategoria)/(:video)/video' => 'video/index/$3/$2/$1', // Detalle video en N2
'sat/(:categoria)/(:subcategoria)/(:subsubcategoria)/(:video)/video' => 'video/index/$4/$3/$2/$1', // Detalle video en N2
'descarga/(:any)' => 'descarga/index/$1',
'login' => 'user/login',
);
<?php<br />class Controller_Video extends Controller_Template {
public function before() {
parent::before();
}
public function action_index($video, $categoria = null, $subcategoria = null, $subsubcategoria = null) {
echo 'Get all params:
';
Debug::dump(Request::active()->params());
echo '
';
echo 'Get one by one param
';
echo 'CATEGORIA = '.$categoria.'
';
echo 'SUBCATEGORIA = '.$subcategoria.'
';
echo 'SUBSUBCATEGORIA = '.$subsubcategoria.'
';
echo 'VIDEO = '.$video.'
';
die();
}
}
'sat/(:categoria)/(:subcategoria)/(:subsubcategoria)/(:video)/video' => 'video/index/$4/$3/$2/$1', // Detalle video en N2
'sat/(:categoria)/(:subcategoria)/(:video)/video' => 'video/index/$3/$2/$1', // Detalle video en N2
'sat/(:categoria)/(:video)/video' => 'video/index/$2/$1', // Detalle video en N1
'sat/(:video)/video' => 'video/index/$1', // Detalle video sin cateogorias
It looks like you're new here. If you want to get involved, click one of these buttons!