ZF-8522: Add ability to include "#" in route generation

Issue Type: Sub-task Created: 2009-12-11T05:27:25.000+0000 Last Updated: 2012-11-20T21:37:44.000+0000 Status: Open Fix version(s): Reporter: Jason Austin (jfaustin) Assignee: None Tags: - Zend_Controller

Related issues: Attachments:


It would be excellent to be able to include "#" as part of a URL in route generation. For example, it is currently not possible to generate a route with a hash in it to take a user to a certain anchor within a page.

This would then be supported by the url() view and action helpers. Possible use case from an action would be:

$routeArgs = array( 'module' => 'documentation', 'controller' => 'blog', 'action' => 'tags', 'anchor' => 'add', ); $this->\_helper->redirector->gotoRoute($routeArgs); // or from a view echo $this->url($routeArgs); Currently the only way to accomplish this in an action is to create a URL with the URL helper, append the anchor string to it, call setPrependBase() to "" in redirector helper (this prevents the baseUrl from being prepended twice to the URL, then call ->gotoUrl() on the redirector helper. See discussion from the mailing list here: […]( ### Comments Posted by Ben Scholzen (dasprid) on 2009-12-12T12:04:21.000+0000 I will add a solution for this in the new router system.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.