{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<ul{attributes -> f:format.raw()}>
	<f:render section="itemsList" arguments="{items: items}" />
</ul>

<f:section name="itemsList">
	<f:for each="{items}" as="item">
		<li {f:if(condition: '{item.subItems}', then: 'class="has-dropdown"', else: '')}>
		<neos:link.node node="{item.node}" class="{item.state}"/>
		<f:if condition="{item.subItems}">
			<ul class="subnav">
				<f:render section="itemsList" arguments="{items: item.subItems}" />
			</ul>
		</f:if>
		</li>
	</f:for>
</f:section>
