praiadeseselle/site/templates/categoria.php

25 lines
867 B
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-02-21 14:48:37 +01:00
$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',categorias=$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());
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";