Hi,
sorry to tell that i'm new to pw and my php-skills are low - i try to get a bootstrap 4 navbar working with MSN, and with this Code
<?php
$nav = $modules->get('MarkupSimpleNavigation');
$options = array(
'has_children_class' => 'dropdown',
'list_tpl' => '<li%s>||</li>',
'current_class' => 'active',
'list_field_class' => 'nav-item',
'max_levels' => 2,
'item_tpl' => '<a class="nav-link gek-anim" href="{url}">{title}</a>',
'outer_tpl' => '<ul class="navbar-nav ml-auto">||</ul>',
'inner_tpl' => '<div class="dropdown-menu"><ul>||</ul></div>',
'item_current_tpl' => '<a class="nav-link active" href="{url}">{title}</a>',
);
echo $nav->render($options);
i'm getting this output:
<ul class="navbar-nav ml-auto">
<li class="dropdown nav-item"><a class="nav-link gek-anim" href="/pw/tester/about/">About</a>
<div class="dropdown-menu">
<ul>
<li class="nav-item"><a class="nav-link gek-anim" href="/pw/tester/about/what/">Child page example 1</a></li>
<li class="nav-item"><a class="nav-link gek-anim" href="/pw/tester/about/background/">Child page example 2</a></li>
</ul>
</div>
</li>
<li class="nav-item"><a class="nav-link gek-anim" href="/pw/tester/site-map/">Site Map</a></li>
<li class="active nav-item"><a class="nav-link active" href="/pw/tester/hermens/">hermens</a></li>
</ul>
My question ist now: How can i get the following code in the dropdown?!:
<div class="dropdown-menu">
<a class="nav-link gek-anim" href="/pw/tester/about/what/">Child page example 1</a>
<a class="nav-link gek-anim" href="/pw/tester/about/background/">Child page example 2</a>
</div>
So there shoudn't be the <ul>-tag and the <li>-tags in the dropdown, because bootstrap4 only uses <a>-tags in dropdowns?!
Do i need something from these options?!
'xtemplates' => '', // specify one or more templates separated with a pipe | to use the xitem_tpl and xitem_current_tpl markup
'xitem_tpl' => '<a href="{url}">{title}</a>', // same as 'item_tpl' but for xtemplates pages, can be used to define placeholders
Thanks in advance