Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mention that layouts and inheritance are alternatives
  • Loading branch information
kraih committed Nov 10, 2015
1 parent 0ebd061 commit d6f6ecd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.30 2015-11-04
6.30 2015-11-10

6.29 2015-11-03
- Fixed a few bugs in built-in templates. (Zoffix, sri)
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -771,8 +771,8 @@ also be used to pass whole sections of the template to the layout.

=head2 Template inheritance

Inheritance takes the layout concept above one step further, the helpers
L<Mojolicious::Plugin::DefaultHelpers/"content"> and
Inheritance is an alternative to the layout concept above, and takes it one step
further, the helpers L<Mojolicious::Plugin::DefaultHelpers/"content"> and
L<Mojolicious::Plugin::DefaultHelpers/"extends"> allow you to build a skeleton
template with named blocks that child templates can override.

Expand Down
5 changes: 3 additions & 2 deletions t/mojolicious/exception_lite_app.t
Expand Up @@ -156,7 +156,8 @@ $t->get_ok('/dead_included_template')->status_is(500)

# Dead template with layout
$t->get_ok('/dead_template_with_layout')->status_is(500)
->content_like(qr/dead template with layout!/)->content_like(qr/line 2/);
->content_like(qr/dead template with layout!/)->content_like(qr/line 2/)
->content_unlike(qr/Green/);
like $log, qr/dead template with layout!/, 'right result';

# Dead action
Expand Down Expand Up @@ -264,7 +265,7 @@ done_testing();

__DATA__
@@ layouts/green.html.ep
%= content
Green<%= content %>
@@ dead_template.html.ep
% die 'dead template!';
Expand Down

0 comments on commit d6f6ecd

Please sign in to comment.