Welcome Guest, Not a member yet? Register   Sign In
Using helpers in Routes.php ??
#1

[eluser]umbungo[/eluser]
I would like to know how i can use a helper in routes.php.

I have a list of main categories in config.php, and a custom url helper. I would like to do the following instead of mainting 2 separate lists;
Code:
foreach(config_item('categories') as $category){
    $categ = url_encode($category);
    $route[$categ] = "main/main/$categ";
    $route[$categ.'/:any'] = "main/main/$categ/$1";
}
However this stops everything from working. I tried loading the helper manually also (it is in autoload), but this didn't help.


Messages In This Thread
Using helpers in Routes.php ?? - by El Forum - 02-10-2012, 09:27 AM
Using helpers in Routes.php ?? - by El Forum - 02-10-2012, 11:45 AM
Using helpers in Routes.php ?? - by El Forum - 02-10-2012, 11:49 AM
Using helpers in Routes.php ?? - by El Forum - 02-10-2012, 02:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB