2022-03-14 14:56:35 +01: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-03-14 14:56:35 +01:00
|
|
|
|
2023-02-21 14:48:37 +01:00
|
|
|
$menu = '';
|
|
|
|
|
|
|
|
if($configuracion['mantemento']['activo'] && !$user->isLoggedin())
|
2022-03-14 14:56:35 +01:00
|
|
|
{
|
2024-10-22 19:45:48 +02:00
|
|
|
$menu = renderMenu($inicio->and($pages->get('/noticias')->and($pages->get('/contacto'))));
|
2022-03-14 14:56:35 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-10-22 19:45:48 +02:00
|
|
|
$menu = renderMenu($inicio->and($inicio->children));
|
2023-02-21 14:48:37 +01:00
|
|
|
}
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2023-02-21 14:48:37 +01:00
|
|
|
$categorias = pages()->get('/noticias/categorias/')->children();
|
|
|
|
$etiquetas = pages()->get('/noticias/etiquetas/')->children();
|
2024-10-22 19:45:48 +02:00
|
|
|
?>
|
|
|
|
<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, true);?>
|
|
|
|
<?=renderCategoriasEtiquetas($etiquetas);?>
|
|
|
|
</aside>
|
|
|
|
<div>
|
2024-11-14 18:42:06 +01:00
|
|
|
<h2 class="visually-hidden"><?=_x('Posts', 'posts');?></h2>
|
2024-10-22 19:45:48 +02:00
|
|
|
<?php
|
2023-02-21 14:48:37 +01:00
|
|
|
if($page->numChildren)
|
|
|
|
{
|
2024-10-22 19:45:48 +02:00
|
|
|
$publicacions = pages()->get('/noticias/publicaciones/')->children("template='publicacion',sort=-fecha_publicacion,limit=10");
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2024-10-22 19:45:48 +02:00
|
|
|
echo renderPaxinacion($publicacions, 'superior');
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2023-02-21 14:48:37 +01:00
|
|
|
foreach($publicacions as $publicacion)
|
|
|
|
{
|
2024-10-22 19:45:48 +02:00
|
|
|
echo renderArtigos($publicacion, $languages->getLocale());
|
2022-10-25 14:47:38 +02:00
|
|
|
}
|
2023-02-21 14:48:37 +01:00
|
|
|
|
2024-10-22 19:45:48 +02:00
|
|
|
echo renderPaxinacion($publicacions, 'inferior');
|
2023-02-21 14:48:37 +01:00
|
|
|
}
|
2024-10-22 19:45:48 +02:00
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<?php
|