[Catalyst] Re: How to get uri_for something with a fragment?

Octavian Rasnita orasnita at gmail.com
Wed Mar 9 11:37:48 GMT 2011


From: "Pedro Melo" <melo at simplicidade.org>
> Hi,
>
> On Wed, Mar 9, 2011 at 6:11 AM, will trillich
> <will.trillich at serensoft.com> wrote:
>> I can't see that the original question has been answered. I'm interested 
>> as
>> well...
>
> I just opened Catalyst.pm ($VERSION = 5.80030) and read the code for
> uri_for. As far as I can tell, there is no support for #anchors.
>
> Bye,
> -- 
> Pedro Melo


Catalyst uses the module URI and that module supports fragments:

[% uri = c.uri_for('/static/foo'); CALL uri.fragment('bar'); uri%]

It will print something like:

http://www.site.com/static/foo#bar
Octavian




More information about the Catalyst mailing list