Skip to content

Commit

Permalink
[TASK] Mention "in" strict comparison for tree.pagelayout
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala authored Nov 28, 2024
1 parent ec68a39 commit 634019d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Documentation/Conditions/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ tree.pagelayout
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
# Using backend layout records
[tree.pagelayout == 2]
[tree.pagelayout === "2"]
# ...
[END]
# Using the TSconfig provider of backend layouts
[tree.pagelayout == "pagets__Home"]
[tree.pagelayout === "pagets__Home"]
# ...
[END]
Expand All @@ -190,6 +190,12 @@ tree.pagelayout
# ...
[END]
.. attention::
The value of `pagelayout` is a string, even when using BE layout records.
This is especially important in conditions using `in` as shown here since
this operator performs a strict comparison by default. For clarity and
consistency strict comparisons should also be used in other cases.

.. index::
Conditions; tree.rootLine
.. _condition-tree-rootLine:
Expand Down

0 comments on commit 634019d

Please sign in to comment.