Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Garden + Vanilla2 - Routes
Hi ...
currently i try to build a Applikation on Garden. And i want to set a route to my Controller ... so i use a route like this:
$Configuration['Routes']['foobar/:alphanum'] = 'myController/myFunction/';
that wokrs fine for:
http://mydomain.de/foobar/bar or http://mydomain.de/foobar/foo
but i like to have the last part of the URL as a parameter in my Controller function ... is possible?
Sorry ... my englisch is not so nice
rene
currently i try to build a Applikation on Garden. And i want to set a route to my Controller ... so i use a route like this:
$Configuration['Routes']['foobar/:alphanum'] = 'myController/myFunction/';
that wokrs fine for:
http://mydomain.de/foobar/bar or http://mydomain.de/foobar/foo
but i like to have the last part of the URL as a parameter in my Controller function ... is possible?
Sorry ... my englisch is not so nice
rene
0
Comments
ibrary/core/class.dispatcher.php in line 378
Original:
if (strpos($Destination, '$') !== FALSE && strpos($this->Request, '(') !== FALSE)
Better:
if (strpos($Destination, '$') !== FALSE && strpos($Route, '(') !== FALSE)
after this the following Route works fine:
foobar/:alphanum -> myController/myFunction//$1
LG
René
That's something you add in your application.
http://github.com/papst23/Garden/commit/cf9dcc7f0ff23a623b7307e63a7cdda23ee8f55e