2022-06-07 23:31:36 +00:00
|
|
|
{{ $currentPage := . }}
|
|
|
|
{{ if .HasChildren }}
|
|
|
|
<li class='{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}'>
|
|
|
|
<a href='#'>{{ .Pre }}<span>{{ .Name }}</span></a>
|
|
|
|
</li>
|
2022-08-18 13:41:11 +00:00
|
|
|
<li>
|
|
|
|
<ul class='sub-menu'>
|
|
|
|
{{ range .Children }}
|
|
|
|
<li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'>
|
|
|
|
<a href='{{ .URL }}'>{{ .Name }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
2022-06-07 23:31:36 +00:00
|
|
|
{{ else }}
|
|
|
|
<li>
|
|
|
|
<a href='{{ .URL }}'>
|
|
|
|
{{ .Pre }}
|
|
|
|
<span>{{ .Name }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|