From 634019d501ae1907333751401eeae494b549a43b Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Thu, 28 Nov 2024 10:03:26 +0100 Subject: [PATCH] [TASK] Mention "in" strict comparison for tree.pagelayout --- Documentation/Conditions/Index.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/Conditions/Index.rst b/Documentation/Conditions/Index.rst index 24d2bd4c..a6b53bf9 100644 --- a/Documentation/Conditions/Index.rst +++ b/Documentation/Conditions/Index.rst @@ -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] @@ -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: