[FOLLOWUP][FEATURE] EXT:form - support translation arguments 89/54989/2
authorMathias Brodala <mbrodala@pagemachine.de>
Fri, 8 Dec 2017 12:21:28 +0000 (13:21 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Fri, 8 Dec 2017 12:58:49 +0000 (13:58 +0100)
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>
typo3/sysext/core/Documentation/Changelog/master/Feature-81363-AcceptFormElementTranslationArguments.rst

index 9676da8..48b8aad 100644 (file)
@@ -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
                             }