[wp-trac] [WordPress Trac] #12713: Revise Nav Menus based on wireframe testing
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 16 01:40:57 UTC 2010
#12713: Revise Nav Menus based on wireframe testing
-------------------------+--------------------------------------------------
Reporter: ptahdunbar | Owner: ptahdunbar
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Menus | Version:
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Comment(by greenshady):
Replying to [comment:5 MadtownLems]:
> Can the menus tie into Theme Development better? For example, if I
build a theme that has some tabs across the top, and another place with
some buttons, and I'd like the Menu system to control what
pages/posts/links appear in each of these menus, I run into a lot of
trouble. How do I know what menu is supposed to go where?
>
> I could require that if they want a menu to show up as Tabs, they need
to name it Tabs. But that seems like a pretty poor idea.
>
> I'd like my theme to be able to, say, register 2 menus. One of which is
always displayed by my theme in one place, and another in another place.
This doesn't really seem very easy to do with the current plan, especially
in a MultiSite setup where I'm not building each blog.
Check if the menu exists. If not, create it:
{{{
if ( !is_nav_menu( 'super-duper' ) )
wp_create_nav_menu( __( 'Super Duper' ), array( 'slug' => 'super-
duper' ) );
}}}
Then, call that specific menu in your templates:
{{{
wp_nav_menu( array( 'menu' => 'super-duper' ) );
}}}
This is basically the same thing you'd do with creating sidebars for your
theme.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12713#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list