2022-10-25 14:47:38 +02:00
|
|
|
<?php namespace ProcessWire;
|
|
|
|
|
|
|
|
$mantemento = $inicio->mantemento;
|
|
|
|
|
|
|
|
if($mantemento && !$user->isLoggedin())
|
|
|
|
{
|
|
|
|
$session->redirect($inicio->url);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-27 14:10:14 +02:00
|
|
|
$menu = renderMenu($inicio->and($inicio->children), 0, 'paxinas');
|
|
|
|
$contido = '';
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2022-10-27 14:10:14 +02:00
|
|
|
$publicacions = pages()->get('/noticias/publicaciones/')->children("template='publicacion',categorias=$page,sort=-fecha_publicacion,limit=10");
|
2022-10-25 14:47:38 +02:00
|
|
|
|
2022-10-27 14:10:14 +02:00
|
|
|
$contido .= renderMigasPan($page) . "\n";
|
|
|
|
$contido .= '<article id="' . $page->name .'">' . "\n";
|
|
|
|
$contido .= '<div class="contedor">' . "\n";
|
|
|
|
$contido .= '<h2 class="visually-hidden">' . ucfirst($page->title) . '</h2>' . "\n";
|
2022-10-25 14:47:38 +02:00
|
|
|
$contido .= '<section id="publicacions">' . "\n";
|
|
|
|
$contido .= renderPaxinacion($publicacions, 'superior');
|
2022-10-27 14:10:14 +02:00
|
|
|
|
2022-10-25 14:47:38 +02:00
|
|
|
foreach($publicacions as $publicacion)
|
|
|
|
{
|
2022-10-27 14:10:14 +02:00
|
|
|
$contido .= renderArtigos($publicacion, $languages->getLocale());
|
2022-10-25 14:47:38 +02:00
|
|
|
}
|
|
|
|
$contido .= renderPaxinacion($publicacions, 'inferior');
|
|
|
|
$contido .= '</section>' . "\n";
|
2022-10-27 14:10:14 +02:00
|
|
|
$contido .= '</div>' . "\n";
|
2022-10-25 14:47:38 +02:00
|
|
|
$contido .= '</article>' . "\n";
|
|
|
|
}
|