Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with blog type items ordering option #3803

Open
simogeo opened this issue Feb 23, 2024 · 10 comments
Open

problem with blog type items ordering option #3803

simogeo opened this issue Feb 23, 2024 · 10 comments

Comments

@simogeo
Copy link

simogeo commented Feb 23, 2024

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

@pmoreno-rodriguez
Copy link
Contributor

Hi.
What theme are you using?

@simogeo
Copy link
Author

simogeo commented Feb 23, 2024

Hi, I use hydrogen theme with Gantry 5

@pmoreno-rodriguez
Copy link
Contributor

pmoreno-rodriguez commented Feb 23, 2024

Are you using the default contentarray particle included with hydrogen or any other?

@simogeo
Copy link
Author

simogeo commented Feb 23, 2024

I did not add anything myself, so I guess !

@pmoreno-rodriguez
Copy link
Contributor

pmoreno-rodriguez commented Feb 23, 2024

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.

@simogeo
Copy link
Author

simogeo commented Feb 23, 2024

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.

@pmoreno-rodriguez
Copy link
Contributor

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
---

@simogeo
Copy link
Author

simogeo commented Feb 24, 2024

It should behave as described but it does not.

Can you show me your date format ?

@pmoreno-rodriguez
Copy link
Contributor

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.

@simogeo
Copy link
Author

simogeo commented Feb 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants