mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 04:16:28 +00:00
added more info in the docs
This commit is contained in:
@@ -107,6 +107,27 @@ content is kept in each page (as in solution 2):
|
|||||||
{% endinline %}
|
{% endinline %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
And here is the code for ``even.twig``:
|
||||||
|
|
||||||
|
.. code-block:: jinja
|
||||||
|
|
||||||
|
Some code
|
||||||
|
|
||||||
|
{% block content1 %}
|
||||||
|
Some default content
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
Some other code
|
||||||
|
|
||||||
|
{% block content2 %}
|
||||||
|
Some default content
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
Yet some other code
|
||||||
|
|
||||||
|
The goal of the ``even.twig`` base template being to factor out the ``Some
|
||||||
|
code``, ``Some other code``, and ``Yet some other code`` parts.
|
||||||
|
|
||||||
The ``inline`` tag can be customized with the same options (``with``,
|
The ``inline`` tag can be customized with the same options (``with``,
|
||||||
``only``, ``ignore missing``) as the ``include`` tag:
|
``only``, ``ignore missing``) as the ``include`` tag:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user