Skip to content

Commit

Permalink
#218 Fix article grouping in browseBySection plugin's template
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy-1 committed Oct 19, 2022
1 parent 1f3205d commit da170f7
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,24 @@
{/if}
<div class="col-lg-8">
<div class="page-content">
{if !$articles|@count}
{if !$articleGroups|@count}
<div class="alert alert-danger">
{translate key="plugins.generic.browseBySection.emptySection"}
</div>
{else}
<div class="section-articles">
{foreach from=$articles item=article}
{include file="frontend/objects/article_summary.tpl" section=null showDatePublished=true hideGalleys=true}
{/foreach}
</div>
{foreach from=$articleGroups item=group}
{if $group.key}
<div class="cmp_article_header mb-2 mt-2" id="browse_by_section_group_{$group.key|escape}">
{$group.key|escape}
</div>
{/if}
<div class="section-articles">
{foreach from=$group.articles item=article}
{include file="frontend/objects/article_summary.tpl" section=null showDatePublished=true hideGalleys=true}
{/foreach}
</div>
{/foreach}
{* Pagination *}
{if $prevPage > 1}
{capture assign="prevUrl"}{url|escape router=$smarty.const.ROUTE_PAGE page="section" op="view" path=$sectionPath|to_array:$prevPage}{/capture}
{elseif $prevPage === 1}
Expand Down

0 comments on commit da170f7

Please sign in to comment.