Using menu tab for each panel variant I'm trying to use Panels to arrange content on my site. I've made some strides in creating a panel that displays a view of images based on different criteria.

I added a page (panel) which allows me to tap into Drupal's menu system and make a tab called Photos. Now I want to add a number of variants to this panel, and I want links to those variants to show up in the sub-tab (MENU_DEFAULT_LOCAL_TASK). Since there does not seem to be any way to add a menu item for each variant, I'm wondering what is the best way to do this.

I see two possibilities, both of which don't seem ideal:


I could write a module, that adds the  default local tasks to the menu item.
I could add a separate panel page for each variant, and use the menus there.


It seems like there should be an easy solution to this. Can anyone help me?
I sort of figured out a way to do this.


Add a variant within the Panels module
Add a visibility rule so that different variants show at different URLs (clean URLs and paths required), for example, example.com/paneltitle/variant1, example.com/paneltitle/variant2. 
Create a custom module to hook into the menu. There is a great example of a menu module in the module code samples on drupal.org. A example here for above variants:


`

function custom_module_menu() {
  $items['paneltitle/variant1'] = array(
    'title' =&gt; 'variant1',
    'access arguments' =&gt; array('access content'),
    'type' =&gt; MENU_NORMAL_ITEM,
  );

  $items['paneltitle/variant2'] = array(
    'title' =&gt; 'variant1',
    'access arguments' =&gt; array('access content'),
    'type' =&gt; MENU_NORMAL_ITEM,
  );

  return $items;
}


This seems to have worked for me.