Thread: Url problem
View Single Post
  #1 (permalink)  
Old 06-30-2008, 10:14 PM
Drac Drac is offline
Junior Member
 
Join Date: Jun 2008
Posts: 7
Default Url problem

Hi all,

I just recently started using Zend framework, so sorry if this is a stupid question.

I'm trying to create urls using $this->url() in my views. So for example, in one view I have
PHP Code:
<a href="<?=$this->url(array('controller'=>'profile''action'=>'view'))?>">View profile</a>
And on another I have
PHP Code:
<a href="<?=$this->url(array('controller'=>'profile''action'=>'post' 'id'=>2))?>">View profile</a>
The idea is that the link to the first page is /baseurl/profile/view, and the link to the second is /baseurl/profile/post/id/2. But then any links I have on the second page have //id/2 added to the end of them. It seems that any extra parameters I add to the url are automatically appended to any urls on that page.

Again, sorry if I'm missing something obvious, I just can't seem to figure out what I'm doing wrong.
Reply With Quote