Zdravím,
rád bych si udělal tabs a po kliknutí na danou kategorii by to vypsalo všechny články v dané kategorii.
Mám udělané
Presenter:
$categorys = $this->articleManager->getCategories();
// přístup ke komponentě VisualPaginatoru:
$visualPaginator = $this['visualPaginator'];
// přístup k samotnému paginatoru:
$paginator = $visualPaginator->getPaginator();
// počet položek na stránku
$paginator->itemsPerPage = 4;
// spočítat celkový počet položek
$paginator->itemCount = $articles->count('*');
/* Předání do šablony */
$this->template->articles = $articles;
$this->template->categorys = $categorys;
a šablona
-->
<ul class="nav nav-tabs nav-tabs-fill" role="tablist">
<li n:foreach="$categorys as $category" class="nav-item">
<a class="nav-link" href="#tabs-{$category['category_id']}" role="tab" data-toggle="tab">{$category['title']}</a>
</li>
</ul>
<div class="tab-content">
<div n:foreach="$categorys as $category" role="tabpanel" class="tab-pane fade show" id="tabs-{$category['category_id']}">
<div class="nk-gap"></div>
<!-- START: Action Tab -->
<div class="nk-blog-post nk-blog-post-border-bottom">
<div class="row vertical-gap">
<div class="col-lg-3 col-md-5">
<a href="blog-article.html" class="nk-post-img">
<img src="{$basePath}/images/post-9-mid-square.jpg" alt="He made his passenger captain of one">
<span class="nk-post-categories">
<span class="bg-main-1">Action</span>
</span>
</a>
</div>
<div class="col-lg-9 col-md-7">
<h2 class="nk-post-title h4"><a href="blog-article.html">He made his passenger captain of one</a></h2>
<div class="nk-post-date mt-10 mb-10">
<span class="fa fa-calendar"></span> Jul 3, 2018
<span class="fa fa-comments"></span> <a href="#">0 comments</a>
</div>
<div class="nk-post-text">
<p>Just then her head struck against the roof of the hall: in fact she was now more than nine feet high, and she at once took up the little golden key and hurried off to the garden door...</p>
</div>
</div>
</div>
</div>
<!-- END: Action Tab -->
<div class="nk-gap"></div>
</div>
</div>
<!-- END: Tabbed News -->
Tohle má za následek že mi to přidá tabs s danými kategoriemi ale jak co nejefektivněji po vybrání mi to vykreslilo dané články?
Díky za rady a k nakopnutí.