Project

General

Profile

Actions

Feature #89208

closed

Site Settings: Add variants with expression language

Added by Frank Nägler about 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
-
Start date:
2019-09-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Now that we have site settings, it should be possible to configure conditions for them.
The syntax should be the same as for form variants (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/54982/ )

Variants should for now be only configurable when directly editing the file (no GUI for now) - but the GUI must not overwrite variants.

Base use cases that should be possible:
- set different values based on language configuration (for example: different values for Lang 0 or 1)
- set different values based on extension load state (for example: isLoaded('news')..)
- set different values based on application context

Make sure the syntax for the use cases - if similar things exist - stays the same in all contexts (for example the first one should allow siteLanguage.getLocale() == "de_DE" as used in form and probably TS conditions)

Example settings.yaml:

MyVendor:
    MyExtension:
        storagePid: 15
        limit: 10
        variants:
              -
                identifier: EnglishOnly
                properties:
                     storagePid: 16
                     limit: 15
                condition: 'siteLanguage.getLocale() == "en_US.UTF-8"'
              - 
                identifier: DevelopmentContext
                properties: 
                     limit: 1000
                condition: 'applicationContext matches "#Development#" 
             -
                identifier: NewsIsLoaded
                properties:
                    bar: bar
                condition: 'isLoaded("news")'
Actions #1

Updated by Frank Nägler about 5 years ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review about 5 years ago

  • Status changed from In Progress to Under Review

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61753

Actions #3

Updated by Gerrit Code Review about 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61753

Actions #4

Updated by Gerrit Code Review about 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61753

Actions #5

Updated by Gerrit Code Review about 5 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61753

Actions #6

Updated by Susanne Moog over 4 years ago

  • Status changed from Under Review to Closed

As this is part of site settings which need a full conceptual rework, I'm going to close the issue now. We can continue with this topic once the concept is done.

Actions

Also available in: Atom PDF