[BUGFIX] Adjust conditions for Symfony Expressions in RST-files 57/58557/4
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 2 Oct 2018 08:35:50 +0000 (10:35 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 3 Oct 2018 08:46:37 +0000 (10:46 +0200)
Since the original introduction of some new features the syntax used
for the expression was adjusted globally in TYPO3, leading to
examples no longer up-to-date in the documentation shipped as RSTs.

Resolves: #86541
Releases: master
Change-Id: I3c8b78fe05263a6cca5afa52d61f5ea5afe940a4
Reviewed-on: https://review.typo3.org/58557
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/9.3/Feature-84760-TypoScriptConditionsForSiteAndSiteLanguage.rst
typo3/sysext/core/Documentation/Changelog/9.4/Feature-84133-IntroduceVariants.rst
typo3/sysext/core/Documentation/Changelog/9.4/Feature-85829-ImplementSymfonyExpressionLanguageForTypoScriptConditions.rst

index b049520..83d2604 100644 (file)
@@ -17,8 +17,8 @@ The identifier of the site name is evaluated:
 
 .. code-block:: typoscript
 
-       [site = identifier = someIdentifier, base = https://www.typo3.org/]
-               page.30.value = fo
+       [site("identifier") == "someIdentifier"]
+               page.30.value = foo
        [global]
 
 **Condition for the site language**
@@ -27,8 +27,8 @@ Any property of the current site language is evaluated:
 
 .. code-block:: typoscript
 
-       [siteLanguage = locale = de_CH.UTF-8, title = Switzerland]
+       [siteLanguage("locale") == "de_CH.UTF-8"]
                page.40.value = bar
        [global]
 
-.. index:: TypoScript
\ No newline at end of file
+.. index:: TypoScript
index 79b5975..be4c4a1 100644 (file)
@@ -174,7 +174,7 @@ The most needed ones are probably:
 Example
 '''''''
 
-:yaml:`siteLanguage.getLocale() == "de_DE"`.
+:yaml:`siteLanguage("locale") == "de_DE"`.
 
 
 ``applicationContext`` (string)
@@ -243,7 +243,7 @@ Translate form element values depending on the frontend language:
     variants:
       -
         identifier: language-variant-1
-        condition: 'siteLanguage.getLocale() == "en_US.UTF-8"'
+        condition: 'siteLanguage("locale") == "en_US.UTF-8"'
         label: EN
         renderingOptions:
           submitButtonLabel: Submit
@@ -258,7 +258,7 @@ Translate form element values depending on the frontend language:
         variants:
           -
             identifier: language-variant-1
-            condition: 'siteLanguage.getLocale() == "en_US.UTF-8"'
+            condition: 'siteLanguage("locale") == "en_US.UTF-8"'
             label: EN
             renderingOptions:
               previousButtonLabel: 'Previous step'
@@ -274,7 +274,7 @@ Translate form element values depending on the frontend language:
             variants:
               -
                 identifier: language-variant-1
-                condition: 'siteLanguage.getLocale() == "en_US.UTF-8"'
+                condition: 'siteLanguage("locale") == "en_US.UTF-8"'
                 label: EN
                 properties:
                   fluidAdditionalAttributes:
index 9a55296..a75d833 100644 (file)
@@ -185,7 +185,7 @@ The following functions are only available in **frontend** context:
 |                    |            | Example, matches if site `base = http://localhost`              |
 |                    |            | `[site("base") == "http://localhost"]`                          |
 +--------------------+------------+-----------------------------------------------------------------+
-| siteLanguage       | String     | get vale from siteLanguage configuration, or                    |
+| siteLanguage       | String     | get value from siteLanguage configuration, or                   |
 |                    |            | null if no site was found or property not exists                |
 |                    |            |                                                                 |
 |                    |            | Example, match if siteLanguage locale = foo                     |