I did something similar before.
In bootstrap.php or routes.php (better in my book, do it before all the
$Route->connect) you can extract the section from the variable
$from_url, which contains the url after the host. From the top of my
head:
$url = explode('/', $from_url);
$section = $url[0];
unset($url[0]);
$from_url = implode('/', $url);
Now you have the section string in $section and out of the url and Cake
will dispatch '/posts/view' action. You can save $section on a global
or session var to access it from the controller.
Dont know what happens if mod_rewrite is off, though.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---