Welcome Guest Search | Active Topics | Sign In | Register

Red Tabs Menu Control Options
megs
Posted: Monday, October 12, 2009 9:25:54 AM
Rank: Newbie
Groups: Member

Joined: 10/12/2009
Posts: 2
hi there

is there any way of making the red tabs menu control dynamic by setting it to view sitemap ?

thanks
eo_support
Posted: Monday, October 12, 2009 9:48:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Yes. You can do that. In order to populate a menu from your site map, simply place a SiteMapDataSource control in your page and set the menu's DataSourceID to the ID of the SiteMapDataSource control. See here for more details:

http://doc.essentialobjects.com/library/1/menucommon/databinding/populate_datasource.aspx

Note that when you use SiteMapDataSource for the menu, you would usually need to set its ShowStartingNode as false.

You can start from the original red tab sample:

http://demo.essentialobjects.com/Default.aspx?path=Menu\_i0\red_tabs

One thing that is particular about this sample is that its second level is horizontal and all horizontal sub menus are aligned to the left edge instead of their parent item (which is the default behavior). The sample used hard coded negative OffsetX values to move the sub menus towards left so that they all aligned to left edge. Such hard coded values may not be practical if the menu is dynamically populated from your site map. In this case you can take a look of this enhanced version:

http://demo.essentialobjects.com/Default.aspx?path=Menu\menu_programming\_i2\red_tabs2

This version uses multiple menus and it does not need hard coded OffsetX value. The solution involves one "top menu" and multiple "child menus". In order to create such menus from your sitemap, you would populate the main menu from your site map first, then use code to dynamically create and populate the child menu based on your main menu. The following post should have all the necessary code for you:

http://www.essentialobjects.com/forum/postst3536_Web-Menu-Submenu-goes-out-of-the-controol.aspx

Hope this helps. Please feel free to let us know if you have any questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.