Dear Member,
I have a folder called "Organization" (UnPublished + uses a Blank tempalate) and contains the following documents... about, the staff, the volunteers, contact, donate, terms of use, privacy policy.
I need to show "about, donate, contact" in the header region of every page and... show about, contact, donate, terms of use, privacy policy in the footer region of every page.
What is the best way to achieve this?
Thank you for your suggestion,
regards,
-Raavi
-
MODX Staff
- 1,535 Posts
I’d agree with Ryan but if you’re just dying to use DropMenu then I know one solution that people use is to create a separate folder for the header and footer navigations.
Create weblinks in these folders to the main documents, and use DropMenu to generate your menus from these header and footer folders.
Hope that helps, Garry
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
Thanks a lot rthrash and garryn,
I appreciate your suggestions. I have hard coded the links but new problem is this... how do I trap, that the hard linked document is the current document so that it can styled differently.
Do i need to check it in a snippet and supply the chunk which calls the snippet with a class="here" or is there a better way to do it?
regards,
-raavi.
-
MODX Staff
- 1,535 Posts
Hi raavi - Yes, you’ll need to use a snippet to render the links for this.
In the snippet, place your page URLs into an associative array so the key values are the page IDs, then use a foreach loop to output each of the menu items.
This way, you can compare each page ID in the array to the current page ID - obtained using $modx->getDocumentIdentifier(’id’) - and render the ’here’ class if you get a match.
Hope that helps, Garry
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
Thanks again, garryn. That was really quick. I appreciate that.
regards,
-Raavi.