Julian,
I'm going to try and provide some help, please let me know if you need
further explanation.
First, from the API Docs:
------------------------
Zend_View_Helper_Url
url (line 46)
Generates an url given the name of a route.
- return: Url for the link href attribute.
- access: public
string url ([ $urlOptions = array()], [mixed $name = null], [bool $reset =
false], [ $encode = true])
- array $urlOptions: Options passed to the assemble method of the Route
object.
- mixed $name: The name of a Route to use. If null it will use the
current Route
- bool $reset: Whether or not to reset the route defaults with those
provided
- $encode
the value you are going to be interested in is '$reset'. Set this to true
on links where parameters should not persist.
-----------------
Example:
<a href="<?= $this->url(array('controller'=>'index','action'=>'index'),
null, false) ?>">I persist params</a>
<a href="<?= $this->url(array('controller'=>'index','action'=>'index'))
?>">So do I.</a>
<a href="<?= $this->url(array('controller'=>'index','action'=>'index'),
null, true) ?>">I don't</a>
Hope this points you in the right direction!
-Mike
On Mon, Dec 8, 2008 at 11:41 AM, Julian102 <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Im new to zend framework and i am having difficulty understanding how
> parameters are used in the url.
>
> Currently I am making urls using the following code -
>
>
> $this->url(array('controller'=>'controllername','action'=>'actionname','paramname'=>'paramvalue'))
>
> The problem is the parameter is staying in the url in everypage I go to
> following navigating to the page created using the previous code.
>
> I realise that this is probably a ridicuously simple question but I need to
> be certain that I understand why this is happening as its quite a
> fundamental part of the framework
>
> Any help would be greatly appreciated
>
> Thank You
>
> Julian
> --
> View this message in context:
> http://www.nabble.com/Newbie-question-regarding-parameters-in-the-url-tp20899971p20899971.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>