How can I clear url parameters

For programming and general questions on Zend Framework

How can I clear url parameters

Postby andr4578 on Tue Feb 19, 2013 10:15 am

I'am working with Zend Framework and I have the following problem:

just for e.g.
I have few controllers and few actions in each controller
In view I've created few links in such way:
<a href="<?php echo $this->url(array('controller'=>'controller1', 'action'=>'action1'))?>">simple link to controller1 action1</a>

<a href="<?php echo $this->url(array('controller'=>'controller1', 'action'=>'action2', 'id'=>'123'))?>">link to controller1 action2 with parameter</a>

So the problem is when I follow the second link "link to controller1 action2 with parameter" I get following url http://mywebsite .com/controller1/action2/id/123 but when follow the first link "simple link to controller1 action1" parametr in the url stays and I get following url http://mywebsite .com/controller1/action1/id/123
andr4578
 
Posts: 3
Joined: Tue Feb 19, 2013 9:38 am

Re: How can I clear url parameters

Postby andr4578 on Tue Feb 19, 2013 10:21 am

The question is how can I crear url from unnecessary parameter?
andr4578
 
Posts: 3
Joined: Tue Feb 19, 2013 9:38 am

Re: How can I clear url parameters

Postby andr4578 on Wed Feb 20, 2013 6:46 pm

Please correct me if I do something wrong.
andr4578
 
Posts: 3
Joined: Tue Feb 19, 2013 9:38 am


Return to Zend Framework

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron