in reply to Re^3: Passing Parameters via hyperlink
in thread Passing Parameters via hyperlink

Hi,

I found out parameters can be passed like the following:

http://mojolicio.us/perldoc/Mojolicious/Controller#url_for

my $url = $c->url_for('test', {name => 'sebastian'});

If anyone knows how to fetch such a parameter in the template, I am all ears!

Tony

Replies are listed 'Best First'.
Re^5: Passing Parameters via hyperlink
by davido (Cardinal) on Jun 27, 2013 at 20:49 UTC

    Within your template, param('name') should be available. Outside of your template, in controller code it would be $c->param('name'), or in a "lite" app, $self->param('name').


    Dave