List Info

Thread: URL/Link generation question




URL/Link generation question
country flaguser name
United States
2007-09-06 15:44:00
Hi folks,

I'm fiddling around with h.link_to and h.url_for - trying
to
understand the link creation stuff better.

What I understood: h.link_to generates the HTML code,
h.url_for
generates the URL itself based on the routes configuration
and the
data I provide.

What I was wondering which of both methods takes care about
the
creation of the ? parameters of a link and any encoding of
the
corrresponding parameters?

How does routes handle the ? parameters of a url?

I digged around in the docs as well as the source but I
didn't find a
clue - maybe I looked for the wrong keyword.

Regards,
Andrew


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discussgooglegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: URL/Link generation question
user name
2007-09-06 16:24:04
On 9/6/07, A. Smart <smartsmart-knowhow.de>
wrote:
>
> Hi folks,
>
> I'm fiddling around with h.link_to and h.url_for -
trying to
> understand the link creation stuff better.
>
> What I understood: h.link_to generates the HTML code,
h.url_for
> generates the URL itself based on the routes
configuration and the
> data I provide.
>
> What I was wondering which of both methods takes care
about the
> creation of the ? parameters of a link and any encoding
of the
> corrresponding parameters?
>
> How does routes handle the ? parameters of a url?

I believe it converts any keyword args that don't correspond
to route
variables into query parameters.  I've got another Routes
problem so I
can't test it right now.

-- 
Mike Orr <sluggostergmail.com>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discussgooglegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )