<?php
$val .= '<div class="d-block d-md-none">
<nav class="navbar navbar-custom">

  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
  </button>
<div class="collapse navbar-collapse" id="navbarNav">
	<ul class="navbar-nav">
		';

$scope->locally()->obj('Menu', array('1'), true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
			<li class="nav-item ';

$val .= $scope->locally()->XML_val('LinkingMode', null, true);
$val .= '"><a href="';

$val .= $scope->locally()->XML_val('Link', null, true);
$val .= '" title="';

$val .= $scope->locally()->obj('Title', null, true)->XML_val('XML', null, true);
$val .= '" class="nav-link">';

$val .= $scope->locally()->obj('MenuTitle', null, true)->XML_val('XML', null, true);
$val .= '</a>
                ';

if ($scope->locally()->hasValue('Children', null, true)) { 
$val .= '
                    <ul>
                    ';

$scope->locally()->obj('Children', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
                        <li><a href="';

$val .= $scope->locally()->XML_val('Link', null, true);
$val .= '">';

$val .= $scope->locally()->XML_val('Title', null, true);
$val .= '</a></li>
                        ';


}; $scope->popScope(); 
$val .= '
                            </ul>
                        ';


}
$val .= '
            </li>
		';


}; $scope->popScope(); 
$val .= '
	</ul>
    </div>
</nav>
</div>';

