50 lines
1.6 KiB
PHP
50 lines
1.6 KiB
PHP
<?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 */
|
|
|
|
$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));
|
|
}
|
|
|
|
$categorias = pages()->get('/noticias/categorias/')->children();
|
|
$etiquetas = pages()->get('/noticias/etiquetas/')->children();
|
|
$publicacions = pages()->get('/noticias/publicaciones/')->children("template='publicacion',categorias=$page,sort=-fecha_publicacion,limit=10");
|
|
?>
|
|
<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>
|
|
<?php
|
|
echo renderPaxinacion($publicacions, 'superior');
|
|
foreach($publicacions as $publicacion)
|
|
{
|
|
echo renderArtigos($publicacion, $languages->getLocale());
|
|
}
|
|
echo renderPaxinacion($publicacions, 'inferior');
|
|
?>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
<?php
|