Modified blog pagination filter to show only posts which pubdate is less or equal than today's date.
15 lines
417 B
INI
15 lines
417 B
INI
[model]
|
|
name = Blog
|
|
label = Blog
|
|
hidden = yes
|
|
|
|
[children]
|
|
model = blog-post
|
|
order_by = -pub_date, title
|
|
;slug_format = {{ (this.pub_date|dateformat('YYYY/MM/dd/') if this.pub_date) ~ this._id }}
|
|
slug_format = {{ (this.pub_date|dateformat('YYYY/MM/dd/') if this.pub_date) ~ "-".join(this._id.split('-')[3:]) }}
|
|
|
|
[pagination]
|
|
enabled = yes
|
|
per_page = 4
|
|
items = this.children.filter(F.pub_date <= datetime.date.today())
|