Welcome Guest Search | Active Topics | Sign In | Register

Menu - Third level menu? Options
Jaideep Panchal
Posted: Thursday, March 26, 2009 5:48:38 AM
Rank: Newbie
Groups: Member

Joined: 11/12/2008
Posts: 3
I have EO menu.
I have setup the top grop and seconf level menu style.
I am facing problem getting the third level menu style setup ( background image , text etc. ).

I am using asp.ber web.sitemap for populating menu.

Please help.
following is my current html.

<eo:Menu ID="mnuMenu" runat="server" Width="100%" ControlSkinID="None" RaisesServerEvent="True"
DataSourceID="SiteMapDataSource1" HideRoleDisabledItems="True" TopLevelItemAlign="Right"
OnItemClick="mnuMenu_ItemClick" meta:resourcekey="mnuMenuResource1">
<LookItems>
<eo:MenuItem ItemID="_TopLevelItem" Height="25" HoverStyle-CssText="background-image:url('~/Images/nb-hover.gif');font-weight:bold;padding-left:10px;padding-top:6px;"
NormalStyle-CssText="background-image:url('~/Images/nb-inactive.gif');font-weight:bold;padding-left:10px;padding-top:6px;"
SelectedStyle-CssText="background-image:url('~/Images/nb-active.gif');font-weight:bold;padding-left:10px;padding-top:6px;"
Width="55" RightIcon-Url="">
<SubMenu ItemSpacing="6" ShadowDepth="0" Style-CssText="background-color:#040368;color:white;cursor:hand;font-family:arial;font-size:12px;font-weight:bold;padding-bottom:6px;padding-left:6px;padding-right:6px;padding-top:6px;"
ShadowColor="#030303">
</SubMenu>
</eo:MenuItem>
<eo:MenuItem Height="20" HoverStyle-CssText="border-top: #727272 1px solid; color: #040368; background-color: #D4D4D4"
ItemID="_Default" NormalStyle-CssText="border-top-color:#727272;border-top-style:solid;border-top-width:1px;color:white;text-decoration:none;"
Text-Padding-Left="10" Text-Padding-Right="20">
</eo:MenuItem>
<eo:MenuItem HoverStyle-CssText="color: #ffff00; text-decoration: underline" ItemID="second_level"
NormalStyle-CssText="background-image:url('~/Images/bu-page.gif');color:white;text-decoration:none;"
IsSeparator="True">
<SubMenu ItemSpacing="6" ShadowDepth="0" Style-CssText="background-color:#040368;color:white;cursor:hand;font-family:arial;font-size:12px;font-weight:bold;padding-bottom:6px;padding-left:6px;padding-right:6px;padding-top:6px;"
ShadowColor="#030303">
</SubMenu>
</eo:MenuItem>
<eo:MenuItem HoverStyle-CssText="color: #ffff00; text-decoration: underline" ItemID="third_level"
NormalStyle-CssText="background-image:url('~/Images/bu-page.gif');color:white;text-decoration:none;"
IsSeparator="True">
<SubMenu ItemSpacing="6" ShadowDepth="0" Style-CssText="background-color:#040368;color:white;cursor:hand;font-family:arial;font-size:12px;font-weight:bold;padding-bottom:6px;padding-left:6px;padding-right:6px;padding-top:6px;"
ShadowColor="#030303">
</SubMenu>
</eo:MenuItem>
</LookItems>
<TopGroup ItemSpacing="0" Style-CssText="background-color:transparent;cursor:hand;font-family:arial;font-size:12px;font-weight:bold;">
</TopGroup>
</eo:Menu>
eo_support
Posted: Thursday, March 26, 2009 10:28:38 AM
Rank: Administration
Groups: Administration

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

You are almost there. You have already setup additional look items such as "second_level" and "third_level". However you need to associate these look items to the real menu items. "second_level" and "third_level" are not built-in looks items. So their name does not bare any special meaning. In another word, a look item will not be automatically applied to second level items just because you name it "second_level".

In order to associate an look item to the real menu item, you must set the menu item's LookID property. There are several ways to do this. You can specify it in your sitemap, then use a Binding object to map your XML attribute to "LookID" field, or you can handle the menu's ItemDataBound event and explicitly set it with code. You can find more information about these in the following topics:

http://doc.essentialobjects.com/library/1/menucommon/databinding/populate_datasource.aspx
http://doc.essentialobjects.com/library/1/eo.web.navigationitem.dataitem.aspx

One more thing that may worth extra attention is, a "SubMenu" is a sub menu of its parent item. So in order to set the third level sub menu styles, you actually modify the second level item's "Sub menu", which means in this case the look item is applied to the second level item.

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.