Pages not showing in menu on Home page

My problem is not with the drop-down menu, but with the navigation. My pages are set as visible under ROOT but they don’t show up in the navigation.
image

Here below the content of the modular.md file from the page “mis servicios”:

---
title: 'mis servicios'
content:
    items: '@self.modular'
visible: true
routable: true
---

This issue appears to happen only in the homepage. If I go directly to the site via the URL (localhost:9900/mis-servicios) then the pages show up in the navigation.

Further context:

  • The pages that I want to display in the navigation are with the numerical prefix
  • I am using quark theme, no children, in a fresh install from Grav version v1.7.44.
  • I have cleared cache various times
  • I have another site that I am building in which the visible pages show correctly in the navigation. I have the same parameters in the quark site (parent: root ; visible: true ; routable: true).

Thank you

@piccolopi, To help the community help you, a bit more relevant information might be handy:

  • The frontmatter of the home page
  • The menu items shown on the home page
  • The frontmatter of a child page that is not showing in the menu of the home page
  • The menu items shown on the ‘mis-servicios’ page
  • A tree of your pages

Note:

  • If pages have numeric prefix, setting visibility: true is not needed. It is the default when using numeric prefixes.
  • By default all pages are routable. There is not need to set routable: true in the header of the page.

Sure. Here it goes.

  • Frontmatter of homepage:
    • I have the page as a modular template (modular.md)
---
title: Home
body_classes: 'title-center title-h1h2'
content:
    items: '@self.modular'
---
  • The menu items shown on the homepage: None. Image below of the header:

  • Frontmatter of a page that is not showing in the menu of the homepage:
    For example the blog page:

---
title: blog
content:
    items:
        - '@self.children'
    limit: 5
    order:
        by: date
        dir: desc
    pagination: true
    url_taxonomy_filters: true
---
  • In blog page, it does show the navigation pages:

  • The front-matter on “mis-servicios” page:

---
title: 'mis servicios'
content:
    items: '@self.modular'
visible: true
routable: true
---
  • The menu items shown on the ‘mis-servicios’ page - apologies, it is in the BLOG page where the navigation pages show correctly. In “mis-servicios” it shows one of the modules as a navigation page, which is not intended and in the admin panel is set as in the pic below


    image

  • A tree of your pages

.
├── 01.home
│   ├── _intro
│   │   ├── hero.md
│   │   └── profile-pic.png
│   ├── modular.md
│   ├── _quien-soy
│   │   └── text.md
│   └── _servicios
│       └── features.md
├── 02.mis-servicios
│   ├── modular.md
│   └── _servicio-1
│       └── features.md
├── 03.blog
│   ├── article-1
│   │   └── blog.md
│   └── blog.md
└── pages.txt

Thanks for the note :slight_smile: and for the help!

@piccolopi,

Darn, I forgot to ask:

  • To show the frontmatter of the child modules below /home…
  • And what you would like to see in the menu.
    I’m guessing you wan to see “Home | Mis servicios | Blog” in the menu of every page.

Any way…

  • In a modular page, if you want to see its siblings in the menu (Home | Mis servicios | Blog), you need to set onpage_menu: false in the header of the modular.
    The default value is onpage_menu: true, which means Quark will show the child modules in the menu.
  • Since the child modules are not visible in the onpage_menu of Home, I’m guessing you have set the following in the header of the child modules of Home: visible: false. This will cause the module not to be shown in the so-called onpage_menu of the modular.

As said before, don’t set properties visible and routable in the header of pages, unless you know what you are doing. Which is not currently the case… :innocent:

In short:

  • Set onpage_menu: false in header of each modular.md
  • Remove properties visible and routable from each and every page.

A post was merged into an existing topic: Disappearing top menu with Quark theme

Hello @anon76427325
Thanks a lot, I followed your instructions and it worked! :hugs:

I was checking for these “onpage_menu” concepts on the docs (to check for more that I can learn, like these) and found this similar issue (that you also solved!) which I had not seen before and that extends this topic even more: Menus & Modular pages leaving it here in case it can help someone else!

Thank you again @anon76427325 !!!