File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -792,6 +792,9 @@ traverse()
792792 # Traverse query parameters of current request along tx_news_pi1[news]
793793 [request && traverse(request.getQueryParams(), 'tx_news_pi1/news') > 0]
794794
795+ # Traverse page properties for current page
796+ [traverse(page ?? [], "pid") == 65]
797+
795798 .. tip ::
796799 Checking for the :ref: `request object <t3coreapi:typo3-request >` to be
797800 available before using :typoscript: `traverse() ` may be necessary, for
@@ -801,6 +804,9 @@ traverse()
801804 available). This avoids the error
802805 `Unable to call method "getQueryParams" of non-object "request" `.
803806
807+ Same is true for the `page ` variable, which might not be available
808+ in all contexts, for example backend modules without a page.
809+ One can use the `?? [] ` workaround.
804810
805811.. index :: Conditions; compatVersion
806812.. _condition-function-compatVersion :
You can’t perform that action at this time.
0 commit comments