Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

[TASK] Mention tree.level starting at 1 not 0 #564

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

garvinhicking
Copy link
Contributor

As mentioned in https://forge.typo3.org/issues/96385 the former treeLevel started at 0 but with the change to tree.level this was changed to be based at 1 for root level.

The docs need to reflect this fact.

As mentioned in https://forge.typo3.org/issues/96385
the former treeLevel started at `0` but with the change to
`tree.level` this was changed to be based at `1` for root
level.

The docs need to reflect this fact.
@kitzberger
Copy link
Contributor

kitzberger commented Nov 14, 2024

@garvinhicking, that's only half the truth though. IMHO it's important to mention the fact the pages.is_siteroot is not having any effect on the backend tree level as it used to have.

@garvinhicking
Copy link
Contributor Author

garvinhicking commented Nov 15, 2024

@kitzberger Thanks... I must admit I don't really understand how to document this, do you have something in mind, how we should address it? (Sadly I also didn't really understand the feedback in the Forge Ticket - I'm not working much in that area so I'm unsure how it is used, not my area of expertise - I thought the treeLevel vs. tree.level thing was "straight enough")

@linawolf
Copy link
Member

I would suggest we merge the part about the root level. The fact that pages.is_siteroot does not exist anymore in conditions seems to be unrelated?

@kitzberger
Copy link
Contributor

Maybe add something like this to that hint:

Unlike the frontend TypoScript condition tree.level this backend tree level is not affected by pages.is_siteroot . This means for nested sites it cannot be used to match "site roots" or in general any n-th levels of page tree depths. It's the absolute depth of the entire page tree, starting with 1.

@garvinhicking
Copy link
Contributor Author

Great, thanks for adding the hint, this sounds good to me, merging now!

@garvinhicking garvinhicking merged commit 434885f into main Nov 18, 2024
4 checks passed
@garvinhicking garvinhicking deleted the treelevel branch November 18, 2024 09:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants