<commit_before>
.. index:: tag;  inherit

.. _tag-inherit:

inherit
=======

Include the markup of a "super" template into the overridden template.


Say you have a module containing ``hello.tpl``::
  
  {% block test %}
  This is content from the module
  {% endblock %}

And in your site you override ``hello.tpl`` as::

  {% block test %}
  {% inherit %}
  This is content from the site
  {% endblock %}

Then, the result of rendering the template will be::

  This is content from the module
  This is content from the site

.. seealso:: :ref:`tag-block`, :ref:`tag-extends` and :ref:`tag-overrules`.
<commit_msg>doc: corrected description and example<commit_after>.. index:: tag;  inherit

.. _tag-inherit:

inherit
=======

Include the markup of an extended template into the extending template.


Say you have a template ``hello.tpl`` containing::
  
  {% block test %}
  This is content from hello.tpl
  {% endblock %}

And in your site you have a ``world.tpl`` template, defined as::

  {% extends "hello.tpl" %}
  {% block test %}
  First line
  {% inherit %}
  This is more content from world.tpl
  {% endblock %}

Then, the result of rendering the template ``world.tpl`` will be::

  First line
  This is content from hello.tpl
  This is more content from world.tpl

.. seealso:: :ref:`tag-block`, :ref:`tag-extends` and :ref:`tag-overrules`.

{'fraction_non_alphanumeric': 0.12988929889298892, 'fraction_numerical': 0.0, 'mean_word_length': 3.52, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1180374', 'n_tokens_mistral': 436, 'n_tokens_neox': 408, 'n_words': 166}