Forum
Disable top level pages
Hi
When generating menus using perch_pages_navigation is it possible to disable links from top level pages but still have them showing in navigation menus?
e.g. I have a navigational menu with a drop down. The top link doesn't actually do anything other than activate a drop down with sub page items. I want the navigation to generate the sub menu but not add a link to the top level page.
You can see via the link the menu in question titled products and markets.
My working html-only template is here
Ideally in perch control panel I'd like the parent page to be titled "market "with subpages under it of "industrial, sports, etc" without the market parent being an actual page – just a master page template.
Am I being thick here?
Many thanks in advance,
Jon
You can test for
pageDepth
. Anything on the top level has apageDepth
of1
Ha ha - I slept on it and this is pretty much the solution I came up with this morning! Thank you Drew.
If anyone else is looking for another solution to this I used
in the end to check for the existence of sub menu items. I ended up at this because there were other top level menu items that I wanted to generate links for.