>
> /data/view/year:2006
>
> When I click next filter's link, e.g. 'Cost', this param add to url
> too:
>
> /data/view/year:2006/cost:500
>
> If I click selected link ('Year'), param remove from url:
>
> /data/view/cost:500
>
> Is it possible to do this?
yep
out-of-box ready-to-use
no AFAIK
you have to do it yourself, the hard way :-)
url: /data/view/
<a href="/data/view/year:2006">year</a>
<a href="/data/view/cost:500">cost</a>
url: /data/view/year:2006
<a href="/data/view/">year</a>
<a href="/data/view/year:2006/cost:500">cost</a>
inside your controller grab the params. pass them to the view, maybe via
an array().
$options=array('year' => '2006');
write a viewHelper, that will do the following:
specialUrlLinkTo ('year',$options); => <a href="/data/view/">year</a>
specialUrlLinkTo ('cost',$options); => <a
href="/data/view/year:2006/cost:500">cost</a>
function getUrl($s,$options) {
$avail_options = array('year' => '2006','cost'=>'500');
$url_hash = '/data/view/';
foreach ($options as $k => $v) {
if ($s<>$k) $url_hash .= $k . ':' . $v . '/';
}
if (!isset($options[$s])) $url_hash .= $s . ':' . $avail_option[$s] .
'/';
return $url_hash;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---