Jump to content


Photo
- - - - -

Dropdown menu list includes top level page


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 michdawson

michdawson

    Member

  • Members
  • PipPip
  • 13 posts

Posted 24 October 2010 - 09:58 PM

I'm trying to accomplish what I think is a common piece of functionality for my site, but surprisingly can't find any mention how to do it. I want to customize my dropdown menu so it includes the top level page as the first item. For example: from: About us -> Board -> Contact Us -> Directions to: About us -> About us -> Board -> Contact Us -> Directions Can this be done with an addition to the header.php? I am using EcoPro. <www.sustainablelafayette.org> thanks in advance, Michael

#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 24 October 2010 - 10:48 PM

It's possible. Go to the header.php file and look for this code:

Please Login or Register to see this Hidden Content

(This controls the dropdown menu)

Replace the code above with this code and then save the file:

Please Login or Register to see this Hidden Content


(The numbers 2, 423, 240, 307, 18, and 111 are the page IDs for the top level pages)

#3 michdawson

michdawson

    Member

  • Members
  • PipPip
  • 13 posts

Posted 24 October 2010 - 11:43 PM

Thanks for the quick reply. I did the above, including substituting the page IDs for all the top level pages, and there seems to be no change in behavior: www.sustainablelafayette.org Is there anything else I need to do? Thanks again.

#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 25 October 2010 - 12:21 AM

Hm, it's probably not adding the top level links in the submenu because they're technically already displayed as menu links. One option is to create, for example, a subpage for "About Us" and that will result in the page being added as a subpage to the menu automatically. The problem with that is that there is already a parent page called "About Us", so it'd be repetitive. Another option is to re-work the navigation menu manually, which can allow you to add the subpages you want to the submenus, but that it must be edited manually every time you add, take away, or change page links. Which option do you prefer? Also, do you want to apply the change to all of the submenus or just one?

#5 wairoa

wairoa

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts

Posted 25 October 2010 - 01:57 AM

You could do it by creating a second [About Us] page under the top [About Us] category, then use a 301 redirect plugin to open the sub-category [About Us] page when the top level link is clicked.

#6 michdawson

michdawson

    Member

  • Members
  • PipPip
  • 13 posts

Posted 25 October 2010 - 04:02 AM

Bingo. The 301 redirect plug in works perfectly. So clean and simple without multiple pages to keep consistent or messy javascript reloads. Thanks Murray and Catrina!