31 lines
1 KiB
PHP
31 lines
1 KiB
PHP
<?php namespace ProcessWire;
|
|
|
|
/** @var Page $page API variable */
|
|
|
|
$menu = '';
|
|
$contido = '';
|
|
|
|
if($configuracion['mantemento']['activo'] && !$user->isLoggedin())
|
|
{
|
|
$menu = renderMenu($pages->get('/noticias')->and($pages->get('/contacto')));
|
|
}
|
|
else
|
|
{
|
|
$menu = renderMenu($inicio->children);
|
|
}
|
|
|
|
$publicacions = pages()->get('/noticias/publicaciones/')->children("template='publicacion',etiquetas=$page,sort=-fecha_publicacion,limit=10");
|
|
|
|
$contido .= renderMigasPan($page) . "\n";
|
|
$contido .= '<article id="' . $page->name .'" class="container">' . "\n";
|
|
$contido .= '<h2 class="visually-hidden">' . ucfirst($page->title) . '</h2>' . "\n";
|
|
$contido .= '<section id="publicacions" class="row row-cols-1 row-cols-lg-2 mb-3">' . "\n";
|
|
$contido .= renderPaxinacion($publicacions, 'superior');
|
|
|
|
foreach($publicacions as $publicacion)
|
|
{
|
|
$contido .= renderArtigos($publicacion, $languages->getLocale());
|
|
}
|
|
$contido .= renderPaxinacion($publicacions, 'inferior');
|
|
$contido .= '</section>' . "\n";
|
|
$contido .= '</article>' . "\n";
|