Hi

On a view I'd like to insert a link which directs to the same url of the current page but adds something, so I thought I'd use

echo $html->link('MyLink', array('foo'=>'bar'));

which I thought would simply reload the current page with the value for foo tacked to the front of the URL.

This is true, but not always; for instance, If I'm in the page

/mysite/mymodel/view

then the link above redirects to

/mysite/bar/mymodel/view

but If I'm in the page

/mysite/mymodel/view/12

then the link above still redirects to

/mysite/bar/mymodel/view

thus the additional argument is not kept...

am I doing something wrong?

thanks in advance
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to