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

C'mon Dave, help me out! ;-)

Like I said, I am just learning. Other folks at work recommended I use Mojolicious with bootstrap.

Tony

Replies are listed 'Best First'.
Re^3: Passing Parameters via hyperlink
by Anonymous Monk on Jun 27, 2013 at 03:12 UTC

    Like I said, I am just learning. Other folks at work recommended I use Mojolicious with bootstrap.

    Well, you're already using Mojo, so  $mojoself->req->params->to_hash

      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

        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