Welcome Guest Search | Active Topics | Sign In | Register

Basic Menu Builder using SiteMapDataSource question Options
Paul
Posted: Friday, April 17, 2009 7:58:39 AM
Rank: Newbie
Groups: Member

Joined: 4/15/2009
Posts: 3
I'm just trying out your software (menu bar) so it's all bit new but my question is:
When you connect a ASP.NET site map data source (DataSourceID="SiteMapDataSource1) it overrides the Menu Items in your builder, which seems to mean that I don't have individual control over each menu item anymore. Is this true? Should I re-enter the sitemap menu items into the Menu Builder? Thanks Paul
eo_support
Posted: Friday, April 17, 2009 8:40:34 AM
Rank: Administration
Groups: Administration

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

That is not true. There are a number of ways to customize/control each menu item.

You can use Menu Builder to create menu item, or create/modify look items. Most appearance settings are set on the look items. Look item in a way is similar to style sheet rule. For example, if you have 20 menu items all with blue background, then instead of setting blue background on all 20 menu items, you would set the blue background on the "_Default" look item. You can have multiple look items. For example, if you have 10 menu items with blue background and the other 10 with green background, you can have two look items and then specify 10 of your menu items to use the first look item and the other 10 use the other look items. See here for more information about look items:

http://doc.essentialobjects.com/library/1/menucommon/lookskinandtheme/looks.aspx

Unless each of your menu items has a different appearance setting, you should set the apparance on look items. When you connect your menu to a SiteMap, it clears all your menu items, but does not clear your look items. So if all of your menu items has the same appearance setting, you would still use Menu Builder to edit the _Default look item and it will be applied to all your menu items even all the menu items are from your site map. In case you need to have multiple look items, you would need to specify which menu item uses which look item. This can be done by including an attribute on each of your SiteMapNode, and then map that attribute to the MenuItem's LookID property with a DataBinding object. You can find more information on how to map an attribute to a MenuItem's LookID at here:

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

You also have the option to modify the menu item with code after it has been populated from your SiteMap. You can modify any property that can be modified with Menu Builder. People usually handle the menu's ItemDataBound event to do such "post populating" modification. However you can perform such modification anywhere in your code as soon as you make sure the menu has already been populated (usually by calling DataBind method).

Hope this helps.

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.