The documentation shows how to put a sub-nav on a parent page with children, but how do I display the same sub-nav on the child pages? http://buildwithstructure.com/documentation/conditionally_display_sub_navigation_or_html/

2 Answers 2


You can use additional or statements to check if you're past or at a certain segment if you want to show it as you go down. Otherwise, sometimes it's easier to use different templates for pages you do or do not want to show it.

  • 1
    I got it working with the structure:parent:entry_id global variable {if structure:child_ids != '' OR structure:parent:entry_id != 0} Mar 22, 2015 at 20:53

I display the menu in an embed with the parent template passing the relevant Entry IDs to display. So using this conditional:

{if "{structure:child_ids}"}
    {exp:structure:entries parent_id="{structure:parent:entry_id}" backspace="1"}

If child page exist, render out the entry IDs of the children, otherwise when you're in one of the child pages, get the parents children.

Putting it together:

{embed="block-embeds/.hub-nav" menu_entries="{if "{structure:child_ids}"}{structure:child_ids}{if:else}{exp:structure:entries parent_id="{structure:parent:entry_id}" backspace="1"}{entry_id}|{/exp:structure:entries}{/if}"}

Then on the child template I have this channel entries call:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.