$c->render('foo/bar/baz', variant => 'phone');
get '/' => sub {my $c = shift;$c->render('foo/bar/baz', variant => 'phone');};
get '/' => sub {my $c = shift;
I see that there is a plugin Mojolicious::Plugin::Mobi. Is that the way to do it? Use its is_mobile() helper to determine whether or not to set the variant to phone?$c->render('foo/bar/baz', variant => $c->is_mobile ? 'phone' : '');};
On Feb 19, 2015 8:13 PM, "sri" <kra...@googlemail.com> wrote:
>
> http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Hooks
Ah wonderful! Thank you for pointing that out!
No matter how many times I read the docs I'll never be able to retain it all at once! :)
> --
> sebastian
>
> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.
> To post to this group, send email to mojol...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.