Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed condition syntax; Conditions in TSconfig #157

Closed
linawolf opened this issue Dec 27, 2020 · 4 comments
Closed

Changed condition syntax; Conditions in TSconfig #157

linawolf opened this issue Dec 27, 2020 · 4 comments

Comments

@linawolf
Copy link
Member

Check if the following examples still work or need to be changed:

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/UsingSetting/Index.html#condition-references

@kitzberger
Copy link
Contributor

@linawolf, I've just had a look at whether [tree.level = X] is working as [treeLevel = X] used to do for PageTS. We usually use this to show certain fields only on site root level, e.g. is_siteroot, backend_layout and backend_layout_next_level.

Hide certain fields globally:

TCEFORM.pages.is_siteroot.disabled = 1
TCEFORM.pages.backend_layout.disabled = 1
TCEFORM.pages.backend_layout_next_level.disabled = 1

But show them on root pages (old syntax):

[treeLevel = 0]
TCEFORM.pages.is_siteroot.disabled = 0
TCEFORM.pages.backend_layout.disabled = 0
TCEFORM.pages.backend_layout_next_level.disabled = 0
[global]

Which translates to the new syntax:

[tree.level == 1]
TCEFORM.pages.is_siteroot.disabled = 0
TCEFORM.pages.backend_layout.disabled = 0
TCEFORM.pages.backend_layout_next_level.disabled = 0
[global]

As you can see, there's a difference in what's considered to treelevel 0. In my opinion that's a bug.

Another thing is that for nested sites the treelevel is not reset even though there's a sys_template record with root=1 set that is processed correctly in FE TypoScript.

So to make the snippet work for PageTS we gotta use this for a root site that's located on absolute treelevel 3:

[tree.level == 4]
TCEFORM.pages.is_siteroot.disabled = 0
TCEFORM.pages.backend_layout.disabled = 0
TCEFORM.pages.backend_layout_next_level.disabled = 0
[global]

@linawolf
Copy link
Member Author

@kitzberger did you make an issue on https://forge.typo3.org/projects/typo3cms-core/issues about this? This sounds like a bug indeed

@kitzberger
Copy link
Contributor

@linawolf, not yet, but now: https://forge.typo3.org/issues/96385

@linawolf
Copy link
Member Author

linawolf commented Feb 5, 2022

I will close this until the Core Issue is resolved

@linawolf linawolf closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants