Handle the case where a section has no pages
This commit is contained in:
parent
e390130d26
commit
c88c34eff6
1 changed files with 9 additions and 7 deletions
|
@ -6,14 +6,16 @@
|
||||||
{% if section.word_count > 0 -%}
|
{% if section.word_count > 0 -%}
|
||||||
{{ section.content }}
|
{{ section.content }}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
<h1 class="title">
|
<h2 class="title"> {{ section.title }} </h2>
|
||||||
{{ section.title }}
|
<h3>Pages:</h3>
|
||||||
</h1>
|
|
||||||
Pages:
|
|
||||||
<ul>
|
<ul>
|
||||||
|
{% if section.pages -%}
|
||||||
{% for page in section.pages -%}
|
{% for page in section.pages -%}
|
||||||
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
|
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
{% else -%}
|
||||||
|
<li>No pages</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
Loading…
Reference in a new issue