kopia lustrzana https://github.com/wagtail/wagtail
moved jinja2 page from Advanced Topics to Reference
rodzic
fdf1597263
commit
93abdabd41
|
|
@ -12,3 +12,4 @@ Reference
|
|||
signals
|
||||
settings
|
||||
project_template
|
||||
jinja2
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ The core templatetags (``pageurl``, ``slugurl``, ``image``, ``richtext`` and ``w
|
|||
|
||||
Note that the variable name ``self`` is reserved in Jinja2, and so Wagtail now provides alternative variable names where ``self`` was previously used: ``page`` to refer to page objects, and ``value`` to refer to StreamField blocks. All code examples in this documentation have now been updated to use the new variable names, for compatibility with Jinja2; however, users of the default Django template engine can continue to use ``self``.
|
||||
|
||||
See: :doc:`/advanced_topics/jinja2`
|
||||
See: :doc:`/reference/jinja2`
|
||||
|
||||
|
||||
Site-specific redirects
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ Due to a change in the way template tags are imported in Django 1.9, it has been
|
|||
]
|
||||
|
||||
|
||||
See: :doc:`/advanced_topics/jinja2`
|
||||
See: :doc:`/reference/jinja2`
|
||||
|
||||
|
||||
ContentType-returning methods in wagtailcore are deprecated
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Wagtail is now compatible with Django 1.10. Thanks to Mikalai Radchuk and Paul J
|
|||
``{% include_block %}`` tag for improved StreamField template inclusion
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In previous releases, the standard way of rendering the HTML content of a StreamField was through a simple variable template tag, such as ``{{ page.body }}``. This had the drawback that any templates used in the StreamField rendering would not inherit variables from the parent template's context, such as ``page`` and ``request``. To address this, a new template tag ``{% include_block page.body %}`` has been introduced as the new recommended way of outputting Streamfield content - this replicates the behaviour of Django's ``{% include %}`` tag, passing on the full template context by default. For full documentation, see :ref:`streamfield_template_rendering`. This feature was developed by Matt Westcott, and additionally ported to Jinja2 (see: :doc:`/advanced_topics/jinja2`) by Mikalai Radchuk.
|
||||
In previous releases, the standard way of rendering the HTML content of a StreamField was through a simple variable template tag, such as ``{{ page.body }}``. This had the drawback that any templates used in the StreamField rendering would not inherit variables from the parent template's context, such as ``page`` and ``request``. To address this, a new template tag ``{% include_block page.body %}`` has been introduced as the new recommended way of outputting Streamfield content - this replicates the behaviour of Django's ``{% include %}`` tag, passing on the full template context by default. For full documentation, see :ref:`streamfield_template_rendering`. This feature was developed by Matt Westcott, and additionally ported to Jinja2 (see: :doc:`/reference/jinja2`) by Mikalai Radchuk.
|
||||
|
||||
|
||||
Unicode page slugs
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue