On Thursday, April 14, 2011, Stéphane Klein <[email protected]> wrote:
> Hi,
>
> context : Pylons 1 and Routes
>
> some time, I need to construct some links like h.url("route_name",
> param1="foobar") but in Javascript.
>
> I would like a url contructor
> (http://routes.groovie.org/modules/util.html#routes.util.url_for) in
> javascript. Does someone have already create this tools ?
Hi Stéphane
We use Mako templates for that here. Like:
<script>
var url = "${url(controller="foo", action="bar")}";
</script>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.