Feature #88276

Provide pagelayout in TypoScript Condition

Added by Daniel Siepmann almost 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2019-05-06
Due date:
% Done:

100%

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

Description

There are certain situations where you need a TypoScript condition based on the current pagelayout. This "variable" is available as data via stdWrap and implemented at https://github.com/TYPO3/TYPO3.CMS/blob/0bfcd25/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L4977

By providing this value as an variable to TypoScript conditions, integrators would be able to use this value, e.g. to switch TypoScript or TSconfig for available fields.

At least this condition is not documented: https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/9.4/Feature-85829-ImplementSymfonyExpressionLanguageForTypoScriptConditions.html We were also not able to find the necessary information within the code.

This is especially useful within TSconfig.

#1

Updated by Daniel Siepmann almost 2 years ago

  • Description updated (diff)
#2

Updated by Guido Schmechel over 1 year ago

Why do you need your own variable? Do I understand something wrong?

Example

[page["layout"] == 1]
page.10 = TEXT
page.10.value = Layout 1
[END]

#3

Updated by Daniel Siepmann over 1 year ago

The special pagelayout is taking inheritance into account. There are two fields on each page, page layout and page layout on next level.

Accessing only one field of the current page, does not provide the requested behaviour. Instead we want to know the current active pagelayout.

Hope this makes it more clear.

#4

Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 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/+/66012

#5

Updated by Gerrit Code Review 6 months ago

Patch set 2 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/+/66012

#6

Updated by Gerrit Code Review 6 months ago

Patch set 3 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/+/66012

#7

Updated by Gerrit Code Review 6 months ago

Patch set 4 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/+/66012

#8

Updated by Georg Ringer 6 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#9

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF