contao/core — pull request #6934 by ausi (2014-05-01 14:47:42+00:00)
Title: Add support for nested blocks in templates

Nesting blocks would make the templates much more flexible. This way you can use more blocks and overwrite smaller parts of a base template.

[Twig also supports it](http://twig.sensiolabs.org/doc/templates.html#template-inheritance).

I also added more blocks to the `fe_page` templates to show how this could be used.

Related issue: #6508

### Example:

Base template:

```html+php

block('body'); ?>

block('content'); ?>

I am the default content.

endblock(); ?>

endblock(); ?>

```

Extended template:

```html+php
extend('...'); ?>
block('body'); ?>

Extending body.

parent(); ?>
endblock(); ?>
block('content'); ?>

Replacing content.

endblock(); ?>
```

Output:
```html

Extending body.

Replacing content.

```