<?php
$val .= '<nav class="primary">
	<ul class="nav_main">
		';

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

$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 .= '">';

$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 class="';

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

$val .= $scope->locally()->XML_val('FirstLast', 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 .= '">';

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


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


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


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

