2022-10-25 14:47:38 +02:00
|
|
|
<?php namespace ProcessWire;
|
|
|
|
|
2024-10-22 19:45:48 +02:00
|
|
|
/** @var Page $page */
|
|
|
|
/** @var Pages $pages */
|
|
|
|
/** @var Config $config */
|
|
|
|
/** @var Sanitizer $sanitizer API variable */
|
|
|
|
/** @var WireInput $input API variable */
|
|
|
|
/** @var User $user API variable */
|
|
|
|
/** @var Languages $languages API variable */
|
|
|
|
/** @var SiteConfig $configuracion */
|
|
|
|
/** @var HomePage $inicio */
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2023-02-21 14:48:37 +01:00
|
|
|
$menu = '';
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2023-03-10 16:52:43 +01:00
|
|
|
if($configuracion['mantemento']['activo'] && !$user->isLoggedin())
|
|
|
|
{
|
2024-10-22 19:45:48 +02:00
|
|
|
$menu = renderMenu($inicio->and($pages->get('/noticias')->and($pages->get('/contacto'))));
|
2023-03-10 16:52:43 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-10-22 19:45:48 +02:00
|
|
|
$menu = renderMenu($inicio->and($inicio->children));
|
2023-03-10 16:52:43 +01:00
|
|
|
}
|
2023-02-21 14:48:37 +01:00
|
|
|
|
2024-10-22 19:45:48 +02:00
|
|
|
$categorias = pages()->get('/noticias/categorias/')->children();
|
|
|
|
$etiquetas = pages()->get('/noticias/etiquetas/')->children();
|
|
|
|
?>
|
|
|
|
<main id="contido" class="completo">
|
|
|
|
<nav id="migas" aria-label="<?=_x("Breadcrumb", "Breadcrumb");?>">
|
|
|
|
<?=renderMigasPan($page);?>
|
|
|
|
</nav>
|
|
|
|
<section id="<?=$page->name;?>" class="noticias destacado">
|
|
|
|
<h1 class="visually-hidden"><?=ucfirst($page->title);?></h1>
|
|
|
|
<aside>
|
|
|
|
<?=renderCategoriasEtiquetas($categorias);?>
|
|
|
|
<?=renderCategoriasEtiquetas($etiquetas, true);?>
|
|
|
|
</aside>
|
|
|
|
<div>
|
|
|
|
<?=renderArtigos($page, $languages->getLocale(), false);?>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<?php
|