Forum
Navgroup Based on Page Name
Hello,
I would like to display a specific navgroup based on a page's name. Is this possible?
I would create navgroups for each page, so I could manually select which pages I would want linked to on the page.
My reason for doing this is because many directories of my website need to link to the same content, located in a different directory and it doesn't make sense to have the file duplicated in each directory.
Thank you! -Trevor
Hi Trevor, it sounds like you're wanting to show these Navgroups as part of the main Nav?
I think it could possible. Below are the steps I think would be necessary:
1) Pass each Navgroup into a variable (probably using a template to put it into a list format) https://docs.grabaperch.com/templates/passing-variables-into-templates/
2) In your Nav template, test for each page and and output the appropriate navgroup variable... e.g.