Bug #80871

Problem with condition [page|backend_layout = <value>] when inherited

Added by Benjamin Hirsch over 4 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-04-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When I use a inherited backend layout, the condition [page|backend_layout = <value>] does not work, because the actual field for this page is empty and it seams that inheritance isn't respected in this case.

Condition:
[page|backend_layout = pagets__standard] AND [globalVar = GP:colPos==0]
...show specific elements in mod.wizards
[end]

As you can see in the attachment, the backend layouts are set for the current and the subpages. Everything is working as expected (the backend layout is used and displayed correctly in the backend), but the condition does not work.


Files

parent-page-settings.JPG (19.9 KB) parent-page-settings.JPG Benjamin Hirsch, 2017-04-18 10:15
#1

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Closed

With this condition you are just checking for the current page row. you would need to check backend_layout_next_level
as well.
you can also build conditions see https://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#userfunc

However take a look at
https://wiki.typo3.org/TYPO3.CMS/Releases/7.5/Feature#Feature:_.2369602_-_Simplify_handling_of_backend_layouts_in_frontend which might simplfy what you want to achieve.

#2

Updated by Benjamin Hirsch over 4 years ago

Thank you Georg. But wouldn't it be logical, that when a subpage which has not explicitly set a backend layout, that in this case the inherited value should be used? Then this is not the case.

#3

Updated by Georg Ringer over 4 years ago

no as with page you just ask for the current page

#4

Updated by Ben Robinson 8 months ago

The desired condition is available in a similar form from TYPO3 11 onwards
https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/11.0/Feature-88276-TypoScriptConditionForPageLayout.html


[tree.pagelayout == "pagets__Home"]
    page.1 = TEXT
    page.1.value = Layout Home
[END]

Also available in: Atom PDF