Hello! I vote for this varian. But maybe switch renderer path ( via
$app->renderer->paths ) related to UA in hooks ( or in bridge ) would be
easer way ? I do something like this for plugin template overriding by main
project.
вторник, 4 февраля 2014 г., 17:39:50 UTC+4 пользователь Sergey Stah написал:
>
> Why not do?
>
> /app/templates/site/ <--- here standart templates
> /app/templates/mobile/ <--- here mobile templates
>
> somewhere in root controller's code
>
> our $template_path = 'site'; # or another method to pass variable
>
> if( $UA =~ /android|ios|blablabla/i ) {
> $template_path = 'mobile';
> }
>
> somewhere in other controllers
>
> $self->render($template_path.'/person/view');
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.