[Catalyst] How to get uri_for something with a fragment?
Ashley Pond V
apv at sedition.com
Mon Mar 7 19:35:10 GMT 2011
On Mon, Mar 7, 2011 at 10:05 AM, John M. Dlugosz <wxju46gefd at snkmail.com> wrote:
> On 3/7/2011 9:34 AM, Ronald J Kimball rkimball-at-pangeamedia.com
> |Catalyst/Allow to home| wrote:
>> On Sun, Mar 6, 2011 at 6:46 AM, John M. Dlugosz<wxju46gefd at snkmail.com>
>>> On 3/6/2011 5:28 AM, Andrew Rodland andrew-at-cleverdomain.org
>>> |Catalyst/Allow to home| wrote:
>>>> Or, since you know that what it generates *doesn't* have a fragment you
>>>> always just $c->uri_for_action(...) . '#id' which will be perfectly
>>>> (although no longer a URI object).
>>> I considered that a hack until I knew better, since it won't work if
>>> are query arguments.
>> Why won't it work if there are query arguments? Seems correct to me.
Using the fragment is probably a bad idea. It's not supported by all
servers so it can end up lost on the backend depending on your setup.
More information about the Catalyst