problem with blog type items ordering option
simogeo opened this issue · comments
Hi,
I have the following configuration in my blog.md file :
---
title: 'Les actualités'
blog_url: actualites
menu: Actualités
body_classes: 'header-lite fullwidth blogstyling'
bg_color: '#E85C5C'
slug: actualites
sitemap:
changefreq: monthly
content:
items: '@self.children'
order:
by: date
dir: desc
limit: '15'
pagination: '1'
feed:
description: 'Les actualités de la Fondation Geomanum'
limit: 10
metadata:
description: 'Suivre l''actualité de la Fondation Geomanum'
pagination: '1'
cache_enable: false
child_type: default
process:
markdown: true
twig: false
robots: index
---
But the order parameter is not working and the limit / pagination neither ... any Clue ?
See online : https://geomanum.org/fr/actualites
Thanks for your support
Hi.
What theme are you using?
Hi, I use hydrogen theme with Gantry 5
Are you using the default contentarray particle included with hydrogen or any other?
I did not add anything myself, so I guess !
Hi,
I have the following configuration in my blog.md file :
--- title: 'Les actualités' blog_url: actualites menu: Actualités body_classes: 'header-lite fullwidth blogstyling' bg_color: '#E85C5C' slug: actualites sitemap: changefreq: monthly content: items: '@self.children' order: by: date dir: desc limit: '15' pagination: '1' feed: description: 'Les actualités de la Fondation Geomanum' limit: 10 metadata: description: 'Suivre l''actualité de la Fondation Geomanum' pagination: '1' cache_enable: false child_type: default process: markdown: true twig: false robots: index ---
But the order parameter is not working and the limit / pagination neither ... any Clue ?
See online : https://geomanum.org/fr/actualites
Thanks for your support
This markdown code, is about your last image? The blog page is based in blog list template but your image refers to blog item.
yes, actually, I use blog
I always edit manually files ... and doing it through the UI generates a big mess. I don't use blog-item neither particle, I use "blog". Forget my screenshot - sorry.
I have tested on a local page based on Gantry and Hydrogen and my blog page works as it should, that is:
- In the blog with descending date order, the most recent pages would be the first to be displayed.
- In the blog with ascending order, it would be the opposite.
I can only think of clearing the cache or clearing the temporary files of your browser, because it seems to work fine.
This is my blog.md:
---
title: 'Blog Page'
blog_url: blog
sitemap:
changefreq: monthly
priority: 1.03
content:
items:
- '@self.children'
order:
by: date
dir: desc
limit: 5
pagination: true
show_date: true
leading: 0
columns: 2
url_taxonomy_filters: true
feed:
description: 'Sample Blog Description'
limit: 10
pagination: true
---
It should behave as described but it does not.
Can you show me your date format ?
It should behave as described but it does not.
Can you show me your date format ?
This is my date config in system.yaml:
dateformat:
default: null
short: 'jS M Y'
long: 'F jS \a\t g:ia'
By default Gantry uses {{ page.date|date(config.system.pages.dateformat.default) }}
in partials\blog_item.html.twig`.
There's something I don't understand yet. In Gantry the blog template does not exist, instead blog_list exists. Therefore, I don't understand how you have a blog.md
file instead of a blog_list.md
.
I mean, the date format in your item.md files (in blog folder). This is mine :
date: 23-02-2024
publish_date: 23-02-2024
There's something I don't understand yet. In Gantry the blog template does not exist, instead blog_list exists. Therefore, I don't understand how you have a blog.md file instead of a blog_list.md.
I set it manually. But I've also tried to set it through gantry using blog_list / blog_item. Still I got the same error.