Skip to content

Commit

Permalink
Adjust documentation for types tag based on fabpot's review
Browse files Browse the repository at this point in the history
  • Loading branch information
drjayvee committed Aug 27, 2024
1 parent ceb4749 commit 76310dd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doc/tags/types.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
``types``
=======
=========

The ``types`` tag declares the types for one or more names variables.
The ``types`` tag declares the types for template variables.

To do this, specify a :ref:`mapping <twig-expressions>` of names to their types as string constants.
To do this, specify a :ref:`mapping <twig-expressions>` of names to their types as strings.

Here is how you declare that variable ``foo`` is a boolean, while ``bar`` is an integer (see note below):

Expand All @@ -14,9 +14,7 @@ Here is how you declare that variable ``foo`` is a boolean, while ``bar`` is an
bar: 'int',
} %}
You may put these all on one line. However, using one line per variable improves readability.

This tag has no effect on the template's output or runtime behavior.
By default, this tag does not affect the template compilation or runtime behavior.

Its purpose is to enable designers and developers to document and specify the context's available
and/or required variables.
Expand Down

0 comments on commit 76310dd

Please sign in to comment.