praiadeseselle/site/templates/etiqueta.php

32 lines
1 KiB
PHP
Raw Normal View History

2022-10-25 14:47:38 +02:00
<?php namespace ProcessWire;
2023-02-21 14:48:37 +01:00
/** @var Page $page API variable */
2022-10-25 14:47:38 +02:00
2023-02-21 14:48:37 +01:00
$menu = '';
$contido = '';
2022-10-25 14:47:38 +02:00
2023-03-10 16:52:43 +01:00
if($configuracion['mantemento']['activo'] && !$user->isLoggedin())
{
$menu = renderMenu($pages->get('/noticias')->and($pages->get('/contacto')));
}
else
{
$menu = renderMenu($inicio->children);
}
2022-10-25 14:47:38 +02:00
2023-02-21 14:48:37 +01:00
$publicacions = pages()->get('/noticias/publicaciones/')->children("template='publicacion',etiquetas=$page,sort=-fecha_publicacion,limit=10");
2022-10-27 14:10:14 +02:00
2023-02-21 14:48:37 +01:00
$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());
2022-10-25 14:47:38 +02:00
}
2023-02-21 14:48:37 +01:00
$contido .= renderPaxinacion($publicacions, 'inferior');
$contido .= '</section>' . "\n";
$contido .= '</article>' . "\n";