praiadeseselle/site/templates/blogue.php

56 lines
1.6 KiB
PHP
Raw Normal View History

<?php namespace ProcessWire;
/** @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 */
2023-02-21 14:48:37 +01:00
$menu = '';
if($configuracion['mantemento']['activo'] && !$user->isLoggedin())
{
$menu = renderMenu($inicio->and($pages->get('/noticias')->and($pages->get('/contacto'))));
}
else
{
$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();
?>
<main id="contido" class="completo">
<nav id="migas" aria-label="<?=_x("Breadcrumb", "Breadcrumb");?>">
<?=renderMigasPan($page);?>
</nav>
<section id="<?=$page->name;?>" class="destacado">
<h1 class="visually-hidden"><?=ucfirst($page->title);?></h1>
<aside>
<?=renderCategoriasEtiquetas($categorias, true);?>
<?=renderCategoriasEtiquetas($etiquetas);?>
</aside>
<div>
<?php
2023-02-21 14:48:37 +01:00
if($page->numChildren)
{
2023-02-27 17:10:20 +01:00
$publicacions = pages()->get('/noticias/publicacions/')->children("template='publicacion',sort=-fecha_publicacion,limit=10");
2022-10-25 14:47:38 +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)
{
echo renderArtigos($publicacion, $languages->getLocale());
2022-10-25 14:47:38 +02:00
}
2023-02-21 14:48:37 +01:00
echo renderPaxinacion($publicacions, 'inferior');
2023-02-21 14:48:37 +01:00
}
?>
</div>
</section>
</main>
<?php