Can I make parent page menu item unclickable?

If you need any more information, don’t hesitate to ask.

Basically, you need to make the link clickable based on some sort of condition. To achieve that, you can either use a field in your text file, or a special template as described in the examples above. These implementations have the advantage that they can be used in a more general way if you later add pages, for which you want to implement the same behavior.

If you only want to implement this for this one page, you just need to add a condition to your menu which checks for the page’s uid while the rest stays all the same:

<nav>
  <?php foreach($pages->visible() as $page): ?>
    <li <?php e($page->isOpen(), ' class="active"') ?>>
      // check for page "courses" and just echo the title
      <?php if($page->uid() == 'courses'): ?>
        <?php echo $page->title()->html() ?>
      // for all other pages wrap a link around the title
      <?php else: ?>
        <a href="<?php echo $page->url() ?>"><?php echo $p->title()->html() ?></a>
      <?php endif ?>
    </li>
  <?php endforeach ?>
</nav>