Struggling with reverse routing here.
I have 3 routes set up:
Router::connect('/:country/listing/:countryname/',
array('controller' => 'properties', 'action' =>
'newindex'),
array('country' => '[a-z]{2}', 'pass' =>
array('countryname')));
Router::connect('/:country/listing/:countryname/:regionname/',
array('controller' => 'properties', 'action' =>
'newindex'),
array('country' => '[a-z]{2}', 'pass' =>
array('countryname', 'regionname')));
Router::connect('/:country/
listing/:countryname/:regionname/:suburbname/',
array('controller' => 'properties', 'action' =>
'newindex'),
array('country' => '[a-z]{2}', 'pass' =>
array('countryname', 'regionname', 'suburbname')));
They are functioning correctly. I can access it via the routed url and
it passes the values correctly.
The problem is with reverse routing,
echo $html->url(array('controller' => 'properties', 'action' =>
'newindex', $geoCountry, $geoRegion, $geoSuburb));
Prints out /za/properties/newindex/south-africa/western-cape/cape-town
Whereas it should use the routing pattern and create /za/listing/south-
africa/western-cape/cape-town (ignore the country in the url, that is
added in appcontroller::redirect and apphelper::url overrides)
I'm pretty stumped with this one!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en