個routes真係好難set。。
有時如果你用named parameter
你就要係routes個到set以下既野
Router::connectNamed(array('Search.cityID','Search.city','Search.validity','Search.check_in','Search.check_out'));
咁佢就識得避開d parameter咁你就好易咁set得返d language la
係apphelper set左以下既野。。。
你就可以等佢自己set lang
但我未試過係咪真係work。。。XD
class AppHelper extends Helper {
function url($url = null, $full = false) {
if(!isset($url['language']) && isset($this->params['language'])) {
$url['language'] = $this->params['language'];
}
return parent::url($url, $full);
}
No comments:
Post a Comment