Menu

Toplinks programming how to?

Help
John T
2004-03-12
2004-03-17
  • John T

    John T - 2004-03-12

    I would like to experiment with adding the MyGedView portal links to the Welcome Page drop down menu.

    Any advice on how this could be written to do this?

    I've tried pasting the menu under the function call, but that resulted in 2 menu items one on top of the other.

    Any assistance would be greatly appreciated.

    John

     
    • John Finlay

      John Finlay - 2004-03-16

      Hi John,

      The simplest way to do this is to change line 5 of the toplinks file to look like this:

      <?php
      $menu = get_gedcom_menu();
      if (!isset($menu["items"])) $menu["items"] = array();
      $menu["items"] = array_merge($menu["items"], get_mygedview_submenu());
      print_menu($menu);
      ?>

      This uses the array_merge php function to merge the submenu from the gedcom menu and the submenu from the mygedview menu.

      --John

       
    • John T

      John T - 2004-03-17

      Thanks John.

      Will play with tonight to see if it feels good to me.

      Thanks,
      John

       
    • John Finlay

      John Finlay - 2004-03-17

      You can also have submenus of menus.  So under the Welcome Page dropdown, you could have a MyGedView submenu. 

      Unfortunately, due to a bug in beta 4, the submenus aren't currently working, but I've fixed the bug so that the submenus will work in the next release.

      --John

       

Log in to post a comment.