Product category is showing in control panel but not in the navigation of my page

Hi there,

I can’t see one of product categories in the navigation menu of my page even though it’s listed in the kirby control panel. Grateful for your guidance.

This information is unfortunately not sufficient to help you. Please post the code of your navigation menu and the relevant blueprint(s) of the pages. Thank you!

Thank you for responding.

This is inside the betten.yml file which lives in blueprints/ pages folder:

title: Betten
num: zero

status:
  draft: true
  listed: true

fields:
  Name:
    label: Titel
    type: text

  Beschreibung:
    label: Inhalt
    type: text

and this is the navigation menu:

  <div class="container">
    <nav class="desktop-navigation">
      <ul>
        <li><a href="#">Home</a></li>
        <li>
          <a href="#">Produkte</a>
          <ul class="dropdown">
            <?php foreach ($site->children()->unlisted()->not(['images', 'home', 'footer', 'impressum', 'error', 'text', 'stuehle',]) as $item) : ?>
              <li><a href="<?= $item->url() ?>"><?= $item->title() ?></a></li>
            <?php endforeach ?>
          </ul>
        </li>
        <?php foreach ($site->children()->listed() as $item) : ?>
          <li><a href="<?= $item->url() ?>"><?= $item->title() ?></a></li>
        <?php endforeach ?>
      </ul>
      <a class="object-contain object-center w-full h-full" id="stroller" alt="Icon" href="<?= $site->url() ?>">
        <img src="<?php echo $site->find('images/svg')->file('icon.svg')->url() ?>">
      </a>
    </nav>
  </div>

The problem happend when I change it to public without selecting a position. Attached is a screenshot.
I changed to public and it vanished from the navigation menu
Screenshot_20230913_124906

Now I don’t have the option to change it back.

There shouldn’t be a position selector because the page seems to use alphabetical sorting (num: zero), so that somehow doesn’t make sense.
Please show your file system structure in the content folder.

If it’s the bett page, then it’s not published.

There is a green button which appears to indicate that it’s online, in fact, when I visit the page it is showing. Update: It is now showing in the main menu but not in the submenu.

PS: I deleted the betten.yml file and kept only the bett.yml file. This is how the bett.yml file looks like:

title: Bett
num: zero

status:
  draft: true
  listed: true

fields:
  Name:
    label: Produkt Name
    type: text

  Beschreibung:
    label: Beschreibung
    type: text

  Accordiontiteleins:
    label: Accordion Titel Nr. 1
    type: text

  Accordionbeschreibungeins:
    label: Accordion Beschreibung Nr. 1
    type: text

  Accordiontitelzwei:
    label: Accordion Titel Nr. 2
    type: text

  Accordionbeschreibungzwei:
    label: Accordion Beschreibung Nr. 2
    type: text

  Accordiontiteldrei:
    label: Accordion Titel Nr. 3
    type: text

  Accordionbeschreibungdrei:
    label: Accordion Beschreibung Nr. 3
    type: text

  files:
    label: Bilder
    type: files
    template: image

The ones with the blue status are showing in the sub menu. When I changed betten to unlisted it showed in the sub menu again.

But that’s what your nav menu code does!

Yes, but I had to change the ‘Bett’ to unlisted in the Kirby panel for it work. If I choose public it will disappear.

It doesn’t help if you don’t provide all relevant information without people having to ask for every little detail. I don’t have a crystal ball to view your code remotely.

So from where does it disappear? Make sure that where it should be listed, lists all page statuses. Otherwise, post relevant blueprint please

4 posts were split to a new topic: Subpages don’t show values defined in text file