Skip to content

Instantly share code, notes, and snippets.

@wowaTYPO3
Created February 9, 2023 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wowaTYPO3/868c0329f34d62732d01cc383fc703ed to your computer and use it in GitHub Desktop.
Save wowaTYPO3/868c0329f34d62732d01cc383fc703ed to your computer and use it in GitHub Desktop.
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<nav id="menu">
<header class="major">
<h2>
<f:translate key="LLL:EXT:vt11/Resources/Private/Language/locallang.xlf:menu" />
</h2>
</header>
<ul>
<f:for each="{mainMenu}" as="item">
<f:render section="link" arguments="{_all}" />
</f:for>
</ul>
</nav>
<f:section name="link">
<li>
<f:if condition="{item.children}">
<f:then>
<span class="opener">{item.title}</span>
<f:render section="submenu" arguments="{_all}" />
</f:then>
<f:else>
<f:link.page pageUid="{item.data.uid}" title="{item.title}" target="{item.target}">{item.title}</f:link.page>
</f:else>
</f:if>
</li>
</f:section>
<f:section name="submenu">
<ul>
<f:for each="{item.children}" as="item">
<f:render section="link" arguments="{_all}" />
</f:for>
</ul>
</f:section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment