Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
4/9/2006 4:49:00 PM
Gravatar
Total Posts 7

Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

I am trying to get the SiteMenu control to display menu items from left to right horizontally.  I have tried setting it to "Horizontal" and to nothing and it does not change the display to horizontal. Can anyone tell me what I'm doing wrong?  I looked at the source for the SiteMenu control and it looks okay to me - (I'm not a C# guy).

Thanks!
Jason
4/10/2006 2:34:24 AM
Gravatar
Total Posts 18439

Re: Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

Hi Jason,

That setting on the siteMenu only works if you are using the skmMenu (which I wouldn't recommend thats what we were using before 2.0). To make the ASP.NET menu horizontal, see the settings in the theme.skin file for the menu and you can make it horizontal with the settings there.

Cheers,

Joe
4/10/2006 3:30:01 AM
Gravatar
Total Posts 7

Re: Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

Hi Joe,
Thanks again for the quick reply!  I'll give that a go.

Jason
5/9/2007 7:14:55 AM
Gravatar
Total Posts 5

Re: Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

5/9/2007 7:18:22 AM
Gravatar
Total Posts 5

Re: Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

Editor didnt get displayed the last time when I tried to reply.

My query is; can u be more clear how to change the orientation of the sitemenu control. When I looked into the theme.skin file in the skin for my particular site the menu control details mentioned in the file are commented. I uncommented it and made the required changes but they dont work.Kindly help me !!!!

5/9/2007 8:36:14 AM
Gravatar
Total Posts 18439

Re: Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

Hi,

The layout of the Menu is determined by the Direction property set on the SiteMenu tag in layout.Master and by css. The Direction setting really only determines the css class on the div which wraps the menu. If Direction is set to Horizontal then the div will have the css class AspNet-Menu-Horizontal and if set to Vertical it will be AspNet-Menu-Vertical

Whether the Menu actually renders as horizontal or vertical depends on the css.

mojoPortal includes several skins with Horizontal menus and these skins have the appropriate css. See the skins named jwh1, mojoguidetoglalxy, IBuySpy, splitmenu1 and splitmenu2 for examples to compare to your own skin.

I generally avoid using the theme.skin file for setting anything except css classes. If you set specific style properties like fonts and colors and such on the theme it renders inline markup which makes the page heavier. It is much better to stick with css.

If you do want to use theme properties on the menu you will need to add an entry like this:

<portal:mojoMenu runat="server"...

instead of

<asp:Menu runat="server"...

in theme.skin

because the Menu uses the mojoMenu which derives from asp Menu

Hope it helps,

Joe

5/15/2007 6:15:42 AM
Gravatar
Total Posts 5

Re: Working with the SiteMenu Control in layout.Master - Direction = "Horizontal" not working

thanks it did help :)

You must sign in to post in the forums. This thread is closed to new posts.