Interesting.
I imagine there are two ways.
1. Put the companyname in every $html-link() call as the first param.
2. Override the $html-link method (perhaps in app_helper) to get the
param from the session and then include it in the link. For example:
app_helper would have
function companyLink(sameparams as $html-link)
{
// get the company name from the session
// add company name as first element in param array
// return $html->link(...)
}
You will need to either add $companyName to all controller methods
that would be accessed OR in app_controller add beforeFilter to change
companyName to a named param and remove it from the _GET list. You
could also just check that it is the same for the session and then
unset it from the _GET.
Just some ideas...
S
On Sep 8, 11:43 am, Klesus <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a website with more than one database.
> each DB is a copy for an other client. I want to use my website like
> that :
>
> current :www.serveradress.com/sitedirectory/index
> expected :www.serveradress.com/sitedirectory/companyname/index
>
> the companyname must not be a directory but just an information in
> order to select the DB to use.
> and I want that this prefix will be present during all the session.
>
> Thank you for your help if it is possible.
>
> Sebastien
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---