{namespace neos=Neos\Neos\ViewHelpers}
{namespace ts=Neos\Fusion\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{ts:render(path: '{item.state}.attributes', context: {item: item}) -> f:format.raw()}>
		<neos:link.node node="{item.node}" />
		<f:if condition="{item.subItems}">
			<ul>
				<f:render section="itemsList" arguments="{items: item.subItems}" />
			</ul>
		</f:if>
		</li>
	</f:for>
</f:section>
