Last active
June 21, 2022 08:35
-
-
Save NamelessCoder/522f5fb4b68126dd9a96 to your computer and use it in GitHub Desktop.
Rendering manual menus with VHS
Just a comment for more recent versions of VHS
v:page.menu
is deprecated so usev:menu
hasSubPage
no longer works like it used so here an alternative...
In place of
<f:if condition="{menuPage.hasSubPages}">
Instead now use...
<v:variable.set name="hasSub" value="{v:condition.page.hasSubpages(then: 'TRUE', else: 'FALSE', pageUid: '{item.uid}', includeHidden: 0, showHiddenInMenu: 0)}" />
<f:if condition="{hasSub} =='TRUE' ">
(I found this info from a comment by Rob De Vries in the #fluidtypo3 channel in TYPO3's Slack)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just noticed an error in the closing </v:page>. Should be </v:page.menu>.
Also, I would comment out one of the two ways to render the page links. The double rendering of page links was confusing to me at first.