We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question

Adding unique identifier in navigation template

I’m trying to add unique identifiers to a navigation submenu, I’m currently trying this template:

    <label for="show-submenu-checkbox<perch:content id="_id">">
        <img class="submenu-button" src="/images/menu_hambuger.svg" alt="Show/Hide menu">
    <input type="checkbox" class="show-submenu-checkbox" id="show-submenu-checkbox<perch:content id="_id">">
    <ul class="main-menu-submenu">
        <li<perch:if exists="current_page"> class="selected"</perch:if><perch:if exists="ancestor_page"> class="ancestor"</perch:if>>
        <a href="<perch:pages id="pagePath" />"><perch:pages id="pageNavText" /></a>
      <perch:pages id="subitems" encode="false" />

I want to add a unique identifier for the input checkbox and it’s label. Is there a way to do this?

Here is my diagnostic report:

Perch: 3.1.2, PHP: 7.2.8, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (3.1.2), assets (3.1.2), categories (3.1.2)
App runtimes: <?php $apps_list = [ ];
PERCH_PATH: /Users/nick/Sites/trinitykirkby.org/perch
PERCH_CORE: /Users/nick/Sites/trinitykirkby.org/perch/core
PERCH_RESFILEPATH: /Users/nick/Sites/trinitykirkby.org/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: localhost:8888
DOCUMENT_ROOT: /Users/nick/Sites/trinitykirkby.org
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php


Nick Bramwell

Nick Bramwell 5 points

  • 1 year ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

<perch:pages id="pageID">

Thanks Drew, that works perfectly.