Forum

Thread tagged as: Question, Runway, Field-Types

Display navigation group in template

How can i display the group name of a navigation group in the sub menu template?

Sub menu image The above is an example of what i'm trying to achieve

Segun Folowosele

Segun Folowosele 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It doesn't look like the image is working - is it private?

the image was in my google drive, it was public but i dont know why it wasnt showing, i had to upload to a server

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's still not showing.

Its showing over here, i changed it to a link instead

I think the image is showing up now Thanks

Simon Clay

Simon Clay 127 points

Hi Segun,

Presumably you mean the 'Meta' group?

Can you show the code you have so far?

Yes Simon, this is what i have so far perch/templates/navigation/subitem.html

<perch:before>
    <div class="rd-navbar-megamenu scroll-wrap">
        <ul class="rd-navbar-megamenu-body">
            <li>
                <ul class="list">
                    <h6>Sub-Items</h6>
</perch:before>
        <li<perch:if exists="current_page"> class="active"</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" />
        </li>
<perch:after>
                </ul>
            </li>
        </ul>
    </div>
</perch:after>

and here is what it looks like so far Sub menu image

I want the "Sub-Items" text to be managed by perch runway

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

The title of the navigation group isn't available in the template. Is that what you mean?

Yes Drew, exactly

Drew McLellan

Drew McLellan 2638 points
Perch Support

As you need to know the name of the group in order to display it, the name of the group isn't pulled into the template.

Is there a way around that? or is there something im missing?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the scenario where it would make sense?

Hi Drew, Simon,

Thanks for looking at this. I work with Segun on this site.

The sub-menus are intended as shortcuts into

  1. the photo galleries (header,"Categories") - the source is a Collection containing "projects", essentially groupings for images in galleries. P.S. Sorry for the confusion in the mockups, I realize Categories share a name with the app in Perch.
  2. blog posts - Recent 5 in this case
  3. the meta bit is optional, more importantly to solve the above first.

Thanks in advance!