Skip to content

Commit

Permalink
mention how to render alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 8, 2013
1 parent 4feb86e commit 78fe34d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -171,7 +171,7 @@ controller specified with the attribute L<Mojolicious/"controller_class">.

You can also disable automatic rendering with the method
L<Mojolicious::Controller/"render_later">, which can be very useful to delay
rendering when for example a non-blocking operation has to finish first.
rendering when a non-blocking operation has to be performed first.

=head2 Rendering templates

Expand All @@ -189,6 +189,12 @@ shortcut.

$self->render('foo/bar');

If you're not sure in advance if a template actually exists, you can also use
the method L<Mojolicious::Controller/"render_maybe"> to try multiple
alternatives.

$self->render_maybe('localized/bar') or $self->render('foo/bar');

=head2 Rendering inline templates

Some renderers such as C<ep> allow templates to be passed inline.
Expand Down

0 comments on commit 78fe34d

Please sign in to comment.