Sjabloon:WSNavMenu: verschil tussen versies

Uit Auditpedia
Ga naar:navigatie, zoeken
(Blanked the page)
Label: Leeghalen
Regel 1: Regel 1:
 +
<noinclude>{{Managed
 +
|Version=1.3
 +
|Version notes=1.3 - <span style="color:red;">Modified version for Chameleon 2.0!</span>
 +
1.2 - Removed duplicate ul
 +
1.1 - Add option to use Href for dropdown links, so you can use url parameters.
 +
1.0 - First managed version
 +
|Short description=
 +
|Feature=Wiki:Feature/1530870851
 +
|Status=Live
 +
|Uses managed items=}}
  
 +
This is the '''WSNavMenu''' template. It should be called in the following format:
 +
 +
<pre>
 +
{{WSNavMenu
 +
|Input=
 +
}}
 +
</pre>
 +
 +
</noinclude><includeonly>{{#vardefine:@lt|*}}<!--
 +
  navigation bar
 +
  --><div class="navbar navbar-expand-lg p-navbar noprint w-100 pt-0 pb-0"><!--
 +
 +
--><div class="navbar-header d-lg-none pt-4 pb-4"><!--
 +
            --><div class="navbar-toggle " data-toggle="collapse" data-target="#mw-navigation-collapse"><!--
 +
              --><span class="icon-bar"></span><!--
 +
              --><span class="icon-bar"></span><!--
 +
              --><span class="icon-bar"></span><!--
 +
            --></div><!--
 +
        --></div><!--
 +
 +
--><div id="mw-navigation-collapse" class="collapse navbar-collapse" ><!--
 +
--><ul class="navbar-nav align-items-center"><!--
 +
-->{{#arraymap: {{{Input|}}}  |\n\n |xxx |<!--
 +
-->{{#arraydefine:@item|xxx|/\n/}}<!--
 +
-->{{#ifeq: {{#arraysize:@item}} |1
 +
|<!-- one link: --><li class="nav-item"><!--
 +
  -->{{#arraydefine:@link and title| {{#arrayprint:@item}} |{{#var:@lt }} }}<!--
 +
  -->{{#widget:Link |type=a
 +
|href={{fullurl:{{#arrayindex:@link and title|0}} }}
 +
|text={{#if: {{#arrayindex:@link and title|1}}|{{#arrayindex:@link and title|1}}|{{#arrayindex:@link and title|0}} }}
 +
|class=nav-link
 +
}}</li>
 +
|<!-- dropdown. First item is head item. 
 +
--><li class="nav-item dropdown"><!--
 +
  -->{{#arraydefine:@head link and title| {{#arrayindex:@item|0}} |{{#var:@lt }} }}<!--
 +
  -->{{#widget:Link |type=a
 +
  |href=#
 +
  |text={{#if:{{#arrayindex:@head link and title|1}}|{{#arrayindex:@head link and title|1}}|{{#arrayindex:@head link and title|0}} }} <b class="caret"></b>
 +
|class=nav-link dropdown-toggle
 +
|datatoggle=dropdown
 +
}}<!--
 +
-->{{#arrayslice:@li items|@item|1}}<!--
 +
 +
--><ul class="dropdown-menu" role="menu" aria-labelledby=""><!--
 +
-->{{#arraymap: {{#arrayprint:@li items|;;;}} |;;;|yyy
 +
|{{#switch: yyy
 +
|-=<li class="divider"></li>
 +
|#default={{#arraydefine:@link and title| yyy|{{#var:@lt }} }}<!--
 +
-->{{#switch:{{#arrayindex:@link and title|2}}
 +
|Href={{Dropdown link
 +
|Href={{#arrayindex:@link and title|0}}
 +
|Text={{#if:{{#arrayindex:@link and title|1}}|{{#arrayindex:@link and title|1}}|{{#arrayindex:@link and title|0}} }}
 +
}}
 +
|#default={{Dropdown link
 +
|Page={{#arrayindex:@link and title|0}}
 +
|Text={{#if:{{#arrayindex:@link and title|1}}|{{#arrayindex:@link and title|1}}|{{#arrayindex:@link and title|0}} }}
 +
}} }}
 +
}}
 +
|}}<!--
 +
--></ul>
 +
</li>
 +
<!-- end of switch: --->}}<!--
 +
end of first array: --></li>|}}<!--
 +
--></ul><!--
 +
 +
--></div></div></includeonly>

Versie van 26 okt 2020 13:54


This is the WSNavMenu template. It should be called in the following format:

{{WSNavMenu
|Input=
}}