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

will trillich will.trillich at serensoft.com
Wed Mar 9 06:36:32 GMT 2011


What would be helpful is either

"There's no mechanism within the Catalyst toolkit to generate urls with
anchors, stick to Perl string concatenation"

or

"You can use this handy feature XYZ of the Catalyst toolkit to generate url
strings with anchors"

not

"Browsers handle the anchors so don't try to generate anchors in your server
code."


On Wed, Mar 9, 2011 at 12:25 AM, Julien Sobrier <julien at sobrier.net> wrote:

> The fragment is not sent to the server by the client:
> http://tools.ietf.org/html/rfc3986#section-3.5
> http://en.wikipedia.org/wiki/URL_fragment
> "The fragment identifier functions differently than the rest of the
> URI: namely, its processing is exclusively client-side with no
> participation from the server."
>
> So any server-side property/method will not be able to show the
> fragment. This is not specific to Catalyst.
>
> Julien
>
> On Tue, Mar 8, 2011 at 10:11 PM, will trillich
> <will.trillich at serensoft.com> wrote:
> > I can't see that the original question has been answered. I'm interested
> as
> > well...
> > The manpage for $c->uri_for()
> > at
> http://search.cpan.org/~bobtfish/Catalyst-Runtime-5.80032/lib/Catalyst.pm
> ) talks
> > about ?query=3Dvalues but not about #anchors. Is there any facility via
> e.g.
> > $c->uri_for() to generate a url-with-anchor? Or is it just a matter of
> > tacking on a "#anchor" using perl concatenation?
> >
> >
> >
> > On Tue, Mar 8, 2011 at 8:37 PM, John M. Dlugosz <wxju46gefd at snkmail.com>
> > wrote:
> >>
> >> On 3/8/2011 10:27 AM, Ashley Pond V apv-at-sedition.com |Catalyst/Allow
> to
> >> home| wrote:
> >>>
> >>> Well, the original message was:
> >>>
> >>>>> How do I call uri_for_action and pass it the '#id' part? It's not an
> >>>>> arg and it's not part of the query string. This is called the
> fragment
> >>>>> identifier in the final URL.
> >>>
> >>> uri_for_action makes it implicit that he was seeking a server side use
> >>> of the fragment.
> >>>
> >>> -Ashley
> >>
> >> I just wanted the page that contained the item I knew was on it, witho=
ut
> >> hard-coding the URL like the good people on this list taught me.  I kn=
ow
> the
> >> browser takes care of jumping to that spot on the page.
> >>
> >> --John
> >>
> >> _______________________________________________
> >> List: Catalyst at lists.scsys.co.uk
> >> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> >> Searchable archive:
> >> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> >> Dev site: http://dev.catalyst.perl.org/
> >
> >
> >
> > --
> > The first step towards getting somewhere is to decide that you are not
> going
> > to stay where you are.  -- J.P.Morgan
> >
> > _______________________________________________
> > List: Catalyst at lists.scsys.co.uk
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> > Dev site: http://dev.catalyst.perl.org/
> >
> >
>



-- =

The first step towards getting somewhere is to decide that you are not going
to stay where you are.  -- J.P.Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110309/1f1bf=
3e3/attachment.htm


More information about the Catalyst mailing list