The main horizontal menu does not order by numeric folders

Hello to all
I am stuck with the main horizontal menu because it does not order according to the default order by numeric folders.

  1. I use an inherited Quark theme
  2. I have not touched the original Quark’s navigation.html.twig; only cosmetic changes in the custom.css to change the colors of the main horizontal menu.
  3. I have all Grav and plugins updated. Grav v1.7.48 - PHP 8.0.30

I am facing a strange issue because the directory order displayed in the navbar of the main horizontal menu of the website is:
3 2 4 1 instead of 1 2 3 4

Please note that 3 and 2 both have a sub-menu, item 4 is the contact page, and item 1 is the Home page with a collection of pages but no sub-menu.

Please see the image of the Admin Panel corresponding to the home page (pages/01.blog/blog.md), item 1, but the main menu displays in the wrong order:
3 2 4 1

Horizontal menu on web page:

It should be:

The Web page in the Admin panel: Please note that in Order, the Folder Prefix Number is enabled.

The debugger does not show errors.

This is the frontmatter of the Home page (pages/01.blog/blog.md) folder No. 01

---
title: Home
menu: INMUEBLES
sitemap:
    changefreq: monthly
    lastmod: '22:45 19-01-2025'
body_classes: 'header-dark header-transparent'
custom: 'Venta de Inmuebles'
blog_url: /blog
show_sidebar: false
show_breadcrumbs: true
show_pagination: true
content:
    items:
        - '@self.children'
    limit: 9
    order:
        by: date
        dir: desc
    pagination: true
    url_taxonomy_filters: true
feed:
    description: 'Web site description'
    limit: 10
media_order: 'image-1.jpg,image-2.jpg,image-3.jpg,image-4.jpg,image-5.jpg'
slides:
    -
        image: image-1.jpg
        heading: null
        subheading: null
        button_text: null
        button_url: null
    -
        image: image-2.jpg
        heading: null
        subheading: null
        button_text: null
        button_url: null
    -
        image: image-3.jpg
        heading: null
        subheading: null
        button_text: null
        button_url: null
    -
        image: image-4.jpg
        heading: null
        subheading: null
        button_text: null
        button_url: null
    -
        image: image-5.jpg
        heading: null
        subheading: null
        button_text: null
        button_url: null
lightslider:
    slideMove: 1
    slider_type: text
    type_text_vertical_padding: 70px;
    type_text_horizontal_padding: 50px;
    mode: slide
    auto: 'true'
    loop: 'true'
    pager: 'true'
    controls: 'true'
    keyPress: 'true'
    pauseOnHover: 'true'
    adaptiveHeight: 'false'
    vertical: 'false'
    verticalHeight: 600
    thumbItem: 10
    gallery: 'false'
    galleryMargin: 5
    thumbMargin: 5
    enableTouch: 'true'
    enableDrag: 'true'
    pause: 5000
    speed: 1000
pagination: true
---

# WEBSITE
## Title
## Sub-Title 

Thanks for any help to find the problem.
joejac

@joejac What is the value of the following setting in system.yaml ?

pages:
  order:
    by: default
    dir: asc

Thank you @pamtbaau
This is the configuration of pages:

pages:
  type: regular
  dirs:
    - 'page://'
  theme: quarkCustom
  order:
    by: default
    dir: asc
  list:
    count: 20
   ....

I switched the Admin panel to English and updated my previous screen capture of the blog page from the Admin module. I hope this can help to understand my problem, thanks.

@joejac, A few remarks…

  • Are you using different domains (non localhost)?
    In that case, multiple system.yaml files can co-exist:
    • /user/config/system.yaml
    • /user/yourdomain/config/system.yaml
    • /user/env/yourdomain/config/system.yaml
  • Your screenshot is showing that the template of the page is Blog, however, I’m missing the ‘Blog Config’ tab.
    Are your sure you are inheriting Quark the right way?
1 Like

Thank you @pamtbaau

  1. I am using only one single domain, a test domain, which is not going to be the final domain.
  2. I checked /user/config/system.yaml vs * /user/yourdomain/config/system.yaml*
    And yes, there is a discrepancy!:
  • /user/yourdomain/config/system.yaml has
order:
    by: date
    dir: asc

So I changed /user/yourdomain/config/system.yaml to

order:
    by: default
    dir: asc

And now the main menu order works as expected!! :face_exhaling:

Now I understand why it did not work no matter what I did.

What I still do not understand is why Grav creates so many system.yaml files when there should be only one, and why there is inconsistency in parameters among all of those system.yaml files that should be identical, because I normally make changes only in user/config/site.yaml, I avoid messing with the system.yaml.

Thanks a lot for your great knowledge of Grav, your cooperation, and your invaluable help. :folded_hands:

My last question @pamtbaau
How can I instruct Grav to keep only one single system.yaml only under /user/config/
Thank you

@joejac, I know… asking is so much easier than reading the docs… Automatic Environment Configuration.

Environment configuration is a great feature. You want different configs for your development server, your staging server and production server. If not, you would need to update the single system.yaml file every time you move between the stages, which is error prone.

1 Like