开发者

Add/remove Cake named URL parameter for a link

开发者 https://www.devze.com 2022-12-29 06:52 出处:网络
Using CakePHP 1.3 there are named parameters in the URL like .../name:value/... These are used for example by pagination links .../page:2/key:date/sort:desc/...

Using CakePHP 1.3 there are named parameters in the URL like .../name:value/... These are used for example by pagination links .../page:2/key:date/sort:desc/...

How to generate links with HtmlHelper::link() adding/deleting such named parameters from the current URL?

Basically I want create links to add/remove/modify the category:ID named parameter in the current URL. It must not touch the URL, anchor, other named parameters,开发者_StackOverflow GET parameters in the URL.

Or how can I pass named parameters to HtmlHelper::link()?


link('link text', array('controller' => 'something', 'action' => 'foo', 'category' => $id))

0

精彩评论

暂无评论...
验证码 换一张
取 消