[eluser]davidino86[/eluser]
hi everybody,
i can't understand why my routing rule doesn't work...
this is my route.php
Code:
$route['default_controller'] = "home";
$route['scaffolding_trigger'] = "sthp";
$route['prodotti_biliardi/([a-z0-9]+)/([a-z0-9]+)'] = "prodotti_biliardi/show_products/$1";
//URI like '/en/about' -> use controller 'about'<---------------------------------- START MULTILANGUAGE ROUTE
$route['^it/(.+)$'] = "$1";
$route['^en/(.+)$'] = "$1";
// '/en' and '/fr' URIs -> use default controller
$route['^it$'] = $route['default_controller'];
$route['^en$'] = $route['default_controller'];
then my class "prodotti_biliardi"
Code:
<?php
Class Prodotti_biliardi extends Home
{
public function __construct()
{
parent::__construct();
//---> library
$this->load->library('pagination');
//---> model
$this->load->model('categories_model');
$this->load->model('products_model');
}
function index()
{
//no actions
}
function show_products($id)
{
//menu funciton from home controller class
$this->menu_struct();
$config['base_url'] = base_url().$this->lang->lang().'/prodotti_biliardi/';
$config['total_rows'] = '200';
$config['per_page'] = '20';
//$this->pagination->initialize($config);
//echo $this->pagination->create_links();
$data['query'] = $this->products_model->get_category_products($id);
$this->template->parse_view('content', 'inc/show_products_view', $data);
$this->template->render();
}
}
?>
i'd like that when there is a URL like this
Code:
http://www.mydomain.ltd/en/prodotti_biliardi/C9F19FD7-3302-4289-A50B-C13CB43219F5/Biliardi Vip
my application routes on
Code:
prodotti_biliardi/show_pruducts/C9F19FD7-3302-4289-A50B-C13CB43219F5