Thank you for your answer.

If I put $companyName in all the link and redirection,
the companyname will be interpreted as a controller...

I find a solution for the first access by configuring routes:
$Route->connect('/companyname/:controller/:action', array('controller'
=> 'pages', 'action' => 'display', 'home', 'companyname' => '1'));
It works for the first page but when clicking on a link the
companyname disappear.
In other words, how I can do to keep the companyname prefix during all
the session ?

Seb

On Sep 8, 12:54 pm, starkey <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to