silverstripe-webpack/site/templates/Includes/NavItem.ss

30 lines
1.1 KiB
Scheme
Raw Normal View History

2018-05-28 14:42:05 +02:00
<% if $Children %>
<li class="nav-item dropdown $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>">
<a
class="nav-link dropdown-toggle"
id="NavItem{$ID}"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
href="{$Link}"
title="$Title.XML"
>
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>
</a>
<ul class="dropdown-menu" aria-labelledby="NavItem{$ID}">
<% loop $Children %>
<% include NavItem ExtraClass="dropdown-item" %>
<% end_loop %>
</ul>
</li>
<% else %>
<li class="nav-item $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>">
<a class="nav-link" href="{$Link}" title="$Title.XML">
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>
</a>
</li>
<% end_if %>