From 7143d34bf4f89c204830f16726acbc672c940d45 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Tue, 30 Mar 2021 20:06:47 +0200 Subject: [PATCH] Add setting to section macro to disable article listing --- templates/widgets.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/widgets.html b/templates/widgets.html index 90c2acc..2f8845e 100644 --- a/templates/widgets.html +++ b/templates/widgets.html @@ -80,7 +80,7 @@ Separate entries with a thematic break: {# Need to use separate names for variables, otherwise the paginator collides with that of index.html. Also, full_articles and section_title are useful to home section #} -{% macro section(cur_section=false, cur_paginator=false, full_articles=true, title=true, cur_pages) %} +{% macro section(cur_section=false, cur_paginator=false, full_articles=true, title=true, cur_pages, render_list=true) %}
{% if cur_section %}{# Section presentation #} {% if title %} @@ -92,7 +92,7 @@ Separate entries with a thematic break: {% endif %}{# End of section presentation #} {% set pages = cur_paginator.pages| default(value=cur_pages) %} - {% if pages|length < 1 %} + {% if pages|length < 1 and render_list %}

{{ self::t(key="nothing_yet") }}

{% endif %} {% if cur_section.content %}