Maybe one could add a target to the gotoRoute method in the future. I can't
believe that people don't need to do something like this often.
Similar to
$url = $this->_helper->url->url(array('module' => 'blog',
'controller' => 'documentation', 'action' => 'tags', 'anchor'
=>'comments'));
On Thu, Dec 10, 2009 at 1:02 PM, Hector Virgen <[email protected]> wrote:
> The gotoRoute() method doesn't support hashes, but you can accomplish this
> by using the url action helper to construct the url based on your route, and
> then concatenate your hash to it. Then call the redirector's gotoUrl method:
>
> $url = $this->_helper->url->url(array('module' => 'blog',
> 'controller' => 'documentation', 'action' => 'tags'));
> $url .= "#add";
> $this->_helper->redirector->gotoUrl($url);
>
> --
> Hector
>
>
>
> On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin <[email protected]>wrote:
>
>> I am trying to use the redirector action helper to call gotoRoute.
>> The page I need to go to is something like
>> http://mywebsite.com/blog/documentation/tags/#add which would take me
>> to the "add" anchor in the tags page. To go to that URL, my code is:
>>
>> $this->_helper->redirector->gotoRoute(array('module' => 'blog',
>> 'controller' => 'documentation', 'action' => 'tags'));
>>
>> That takes me to http://mywebsite.com/blog/documentation/tags/ but I
>> need to add "#add" to the end of that. Any idea how one would
>> accomplish that?
>>
>> Thanks
>> Jason
>>
>> --
>> Jason Austin
>> Senior Solutions Implementation Engineer
>> NCSU - OIT - Outreach Technology
>> [email protected]
>>
>
>