From b1e68295a56cf6ab940ce5bdbfb9cccff9ebe12d Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 17 Jan 2024 19:41:25 +0100 Subject: [PATCH] Document accessing TypoScript constants (#614) --- Documentation/Guides/Index.rst | 1 + Documentation/Guides/TypoScriptConstants.rst | 21 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Documentation/Guides/TypoScriptConstants.rst diff --git a/Documentation/Guides/Index.rst b/Documentation/Guides/Index.rst index 89da1f39..6b5c74b7 100644 --- a/Documentation/Guides/Index.rst +++ b/Documentation/Guides/Index.rst @@ -20,3 +20,4 @@ functionality. RTEConfig UseExistingTCAFields NewContentElementWizard + TypoScriptConstants diff --git a/Documentation/Guides/TypoScriptConstants.rst b/Documentation/Guides/TypoScriptConstants.rst new file mode 100644 index 00000000..6decd2aa --- /dev/null +++ b/Documentation/Guides/TypoScriptConstants.rst @@ -0,0 +1,21 @@ +.. include:: ../Includes.txt + +.. _typoscriptconstants-guide: + +============================== +Accessing TypoScript constants +============================== + +To access a TypoScript constant in content elements, +first make it available to all mask elements via TypoScript: + +.. code-block:: typoscript + + lib.maskContentElement { + settings { + pageTitle = {$mysitepackage.page.title} + } + } + +In your mask content element fluid template it can be accessed via +:html:`{settings.pageTitle}`.