Page Sub-menu (not from the Root)

Forums Forums Menus Page Sub-menu (not from the Root)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #810
    adiant
    Member

    I will soon begin work on an upgrade to this plug-in to build menus of Pages that begin somewhere other than the Root ("Home") of the Menu Hierarchy.  Obviously, I’m interested in hearing from anyone who might have already done this.

    Rather than a quick and dirty hard coding of the Page ID of my desired "root" of the submenu (in the page() function in core.php), I am planning a Root field in the admin panels for Menu 1 and Menu 2.  Mainly because the first site I’m working on actually has three menus — three consecutive lines at the top of each web page:  Root menu followed by two submenus of the two major items in the root menu.

    Assuming I don’t weaken and take the quick and dirty route, I will post my changes here, in hopes that Ryan will add them to a future version.

    #6187
    adiant
    Member

    I’ve attached the changed modules (.php files) in the "new" folder of the Zip.  The "old" folder has the same modules before the modifications to allow an easy comparison to see the changes.

    The following is summary of the code changes (also in a .txt file in the Zip):

    admin_page.php:
    – add_option for new fields suckerfish_menuroot and suckerfish_2_menuroot
    – form fields added for suckerfish_menuroot and suckerfish_2_menuroot,
      to bottom of Main Menu Contents and Second Menu Contents sections,
      on Menu Contents tab of plug-in Admin page
    – fields also added to <input type="hidden" name="page_options" value=> field

    core.php:
    – created menuroot() function to create a &child_of= field for calls to wp_list_pages()
    – added calls to menuroot() into the code of functions pages(), pagesdropdown(),
      pages_excludechildren() and pagesdropdown_excludechildren()
    – added global $menu_num to function pixopoint_menu()

    uninstall.php:
    – delete_option for new fields suckerfish_menuroot and suckerfish_2_menuroot

    #6188

    Thanks adiant <img decoding=” title=”Smiley” />

    I’m working on a new menu plugin at the moment and I may include these changes into it.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.