bug fix angenda+sidebar
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
{% set options = { items: {'@page.children': '/agenda'}, 'limit': 3, 'order': {'by': 'date', 'dir': 'asc'} } %}
|
||||
|
||||
{% set options = { items: {'@page.children': '/agenda'} } %}
|
||||
{% set h2 = h2 ?: 'h2' %}
|
||||
{% set h3 = h3 ?: 'h3' %}
|
||||
|
||||
<div class="sidebar">
|
||||
<{{h2}}>À venir</{{h2}}>
|
||||
{% for p in page.collection(options)%}
|
||||
<div class="side-agenda">
|
||||
<a href="{{p.url}}">
|
||||
{% include 'partials/blog/date.html.twig' with {page: p } %}
|
||||
<{{h3}}>{{p.title}}</{{h3}}>
|
||||
{{p.summary(70)}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% set this_year = "now"|date('Y') %}
|
||||
{% set this_month = "now"|date('M') %}
|
||||
{% set this_day = "now"|date('d') %}
|
||||
|
||||
{% for p in page.collection(options).dateRange( this_day ~ this_month ~ this_year, '12/31/' ~ this_year).slice(0, 3).order('date', 'asc') %}
|
||||
<div class="side-agenda">
|
||||
<a href="{{p.url}}">
|
||||
{% include 'partials/blog/date.html.twig' with {page: p} %}
|
||||
<{{h3}}>{{p.title}}</{{h3}}>
|
||||
{{p.summary(70)}}
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="side-all-agenda">
|
||||
<a href="/agenda">voir tout l'agenda</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user