51 lines
2.9 KiB
PHP
51 lines
2.9 KiB
PHP
|
<?php namespace ProcessWire; ?>
|
||
|
<div class="container d-flex flex-wrap" pw-append="menus-1">
|
||
|
<?php echo renderMenu($page->and($inicio->children), 0, 'paxinas', 'me-auto'); ?>
|
||
|
<ul id="usuario" class="nav me-lg-3">
|
||
|
<?php if($user->isLoggedin()): ?>
|
||
|
<li class="nav-item"><a class="btn btn-outline-dark rounded-0 px-2" title="<?php echo _x('Log out', 'Log out'); ?>" href="/?logout=true"><i class='icon-user'></i></a></li>
|
||
|
<li class="nav-item"><a class="btn btn-outline-dark rounded-0 px-2" title="<?php echo _x('Management', 'Management'); ?>" href='/es/gestion'><i class='icon-settings'></i></a></li>
|
||
|
<?php else: ?>
|
||
|
<li class="nav-item"><a class="btn btn-outline-dark rounded-0 px-2" title="<?php echo _x('Log in', 'Log in'); ?>" href='/es/gestion/acceder'><i class='icon-user'></i></a></li>
|
||
|
<?php endif; ?>
|
||
|
</ul>
|
||
|
<ul id="idiomas" class="nav">
|
||
|
<?php foreach($languages as $idioma) : ?>
|
||
|
<?php if(!$page->viewable($idioma)) continue; ?>
|
||
|
<li class="nav-item">
|
||
|
<?php
|
||
|
$url = $page->localUrl($idioma);
|
||
|
$hreflang = $inicio->getLanguageValue($idioma, 'name');
|
||
|
?>
|
||
|
<a class="px-2 btn btn-outline-dark rounded-0<?php echo $idioma->id == $user->language->id ? ' active' : ''; ?>" title="<?php echo $idioma->title; ?>" hreflang="<?php echo $hreflang;?>" href="<?php echo $url; ?>"><?php echo $hreflang; ?></a>
|
||
|
</li>
|
||
|
<?php endforeach; ?>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
<div class="container d-flex flex-wrap" pw-append="menus-usuario">
|
||
|
<ul id="usuario" class="nav me-lg-3">
|
||
|
<?php if($user->isLoggedin()): ?>
|
||
|
<li class="nav-item"><a class="btn btn-outline-dark rounded-0 px-2" title="<?php echo _x('Log out', 'Log out'); ?>" href="/?logout=true"><i class='icon-user'></i></a></li>
|
||
|
<li class="nav-item"><a class="btn btn-outline-dark rounded-0 px-2" title="<?php echo _x('Management', 'Management'); ?>" href='/es/gestion'><i class='icon-settings'></i></a></li>
|
||
|
<?php else: ?>
|
||
|
<li class="nav-item"><a class="btn btn-outline-dark rounded-0 px-2" title="<?php echo _x('Log in', 'Log in'); ?>" href='/es/gestion/acceder'><i class='icon-user'></i></a></li>
|
||
|
<?php endif; ?>
|
||
|
</ul>
|
||
|
<ul id="idiomas" class="nav">
|
||
|
<?php foreach($languages as $idioma) : ?>
|
||
|
<?php if(!$page->viewable($idioma)) continue; ?>
|
||
|
<li class="nav-item">
|
||
|
<?php
|
||
|
$url = $page->localUrl($idioma);
|
||
|
$hreflang = $inicio->getLanguageValue($idioma, 'name');
|
||
|
?>
|
||
|
<a class="px-2 btn btn-outline-dark rounded-0<?php echo $idioma->id == $user->language->id ? ' active' : ''; ?>" title="<?php echo $idioma->title; ?>" hreflang="<?php echo $hreflang;?>" href="<?php echo $url; ?>"><?php echo $hreflang; ?></a>
|
||
|
</li>
|
||
|
<?php endforeach; ?>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
<div class="container" pw-append="menus-2">
|
||
|
<?php echo renderMenu($page->and($inicio->children), 0, 'paxinas', 'col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small'); ?>
|
||
|
</div>
|