From 04e68467b23a8782fa6255ca5bd5023df84e4857 Mon Sep 17 00:00:00 2001 From: Mathias Brodala <mbrodala@pagemachine.de> Date: Fri, 8 Dec 2017 13:21:28 +0100 Subject: [PATCH] [FOLLOWUP][FEATURE] EXT:form - support translation arguments Add missing YAML for TypoLink example. Resolves: #81363 Releases: master Change-Id: I1efc0ab812f96883a938326fb229f1536b7345e0 Reviewed-on: https://review.typo3.org/54989 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org> --- ...-AcceptFormElementTranslationArguments.rst | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-81363-AcceptFormElementTranslationArguments.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-81363-AcceptFormElementTranslationArguments.rst index 9676da851241..48b8aadaa342 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Feature-81363-AcceptFormElementTranslationArguments.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-81363-AcceptFormElementTranslationArguments.rst @@ -10,7 +10,9 @@ Description =========== Passing arguments to form element property translations is now supported to enrich -translations with variable values: +translations with variable values. + +This works for simple, static values purely in YAML: .. code-block:: yaml @@ -27,7 +29,19 @@ translations with variable values: - useful Alternatively, translation arguments can be set via :typoscript:`formDefinitionOverrides` -in TypoScript: +in TypoScript. A common usecase is a checkbox for user confirmation linking to details of +the topic: + +.. code-block:: yaml + + renderables: + fieldWithTranslationArguments: + identifier: field-with-translation-arguments + type: Checkbox + label: I agree to the <a href="%s">terms and conditions</a> + renderingOptions: + translation: + translationFile: path/to/locallang.xlf .. code-block: typoscript @@ -45,6 +59,7 @@ in TypoScript: label { 0 = TEXT 0.typolink { + # Terms and conditions page, could be set also via TypoScript constants parameter = 42 returnLast = url } -- GitLab