Welcome Guest, Not a member yet? Register   Sign In
ROUTES and Functions bug?
#1

[eluser]Unknown[/eluser]
Hi. First, my english is very bad, i'm sorry Smile

Okay, I have an issue with this:

My routes.php look like this:

Code:
$route['articles/(:num)/(:any)'] = "articles/$2/$1";
$route['articles/(:num)/(:any)/(:any)'] = "articles/$2_$3/$1";

Okay, and my "articles" controller contains this:

Code:
function edit($article_id = -1)
{
  echo 'func_edit';
}

function edit_tags($article_id = -1)
{
  echo 'func_edit_tags';
}

Okay, and now, when I request this URL,
/articles/541/edit everything is OKAY. CI requests function 'edit' from controller and output is 'func_edit'

AND ALSO when i request this URL:
/articles/541/edit_tags everything is OKAY. CI requests function 'edit_tags' BUT

I want to request this function like this: /articles/541/edit/tags
and routes look like this:
Code:
$route['articles/(:num)/(:any)/(:any)'] = "articles/$2_$3/$1";

but, this not working.

Any idea? Smile
Thanks.


Messages In This Thread
ROUTES and Functions bug? - by El Forum - 08-23-2012, 06:55 AM
ROUTES and Functions bug? - by El Forum - 08-23-2012, 12:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB