praiadeseselle/site/templates/blogue.php

57 lines
1.7 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="noticias destacado">
<h1 class="visually-hidden"><?=ucfirst($page->title);?></h1>
<aside>
<?=renderCategoriasEtiquetas($categorias, true);?>
<?=renderCategoriasEtiquetas($etiquetas);?>
</aside>
<div>
<h2 class="visually-hidden"><?=_x('Posts', 'posts');?></h2>
<?php
2023-02-21 14:48:37 +01:00
if($page->numChildren)
{
$publicacions = pages()->get('/noticias/publicaciones/')->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