Monday, May 19, 2014

Re: Problem in page view and language switching

> In my Layout/default.ctp I do something like:
> $url =
> join('/',array($this->params['controller'],$this->params['action'],join('/',$this->params['pass'])));
> echo $this->Html->link('GR','/ell/'.$url). ' | ' .
> $this->Html->link('EN','/eng/' . $url) ;

Thank you very much for your suggestion, but since I'd like to keep the link function working rather than manually composing the rewrited url I ended up with an hack like this:

echo $this->Html->link(
$this->Html->image('icons/flags/small/united_kingdom.jpg',array('alt'=>'English','width'=>'25','height'=>'16')),
array('language'=>'eng')+$this->params['pass'],
array('title'=>'English','escape' => false));


--
Lorenzo Milesi - lorenzo.milesi@yetopen.it

YetOpen S.r.l. - http://www.yetopen.it/

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: