Trying to make a two line menu

Topics: Developer Discussion, Help
Jun 18, 2007 at 3:44 AM
Hello.

I'm trying to modify ClubStarteKit 2.0(VB). I'm able to add additional menu links to the menu bar, but when they start wrapping, they don't skip a line and they're kinda like centered in the menu bar.

Does anybody know how to get a decent looking menu with two lines of menu items?

Any help would be gratefully appreciated.

Thanks,
Tony
Jun 18, 2007 at 3:25 PM

Tonyg wrote:
Hello.

I'm trying to modify ClubStarteKit 2.0(VB). I'm able to add additional menu links to the menu bar, but when they start wrapping, they don't skip a line and they're kinda like centered in the menu bar.

Does anybody know how to get a decent looking menu with two lines of menu items?

Any help would be gratefully appreciated.

Thanks,
Tony

Hi Tony - I ran into similar problems when adding pages to the SiteMap, so on http://www.RenegadeSprints.org, I just used the ASP.net menu control for the second line. This may not be the way you want to go, but it's an option to consider and easy to format.

Ed
Jun 18, 2007 at 4:03 PM

efrazier wrote:

Tonyg wrote:
Hello.

I'm trying to modify ClubStarteKit 2.0(VB). I'm able to add additional menu links to the menu bar, but when they start wrapping, they don't skip a line and they're kinda like centered in the menu bar.

Does anybody know how to get a decent looking menu with two lines of menu items?

Any help would be gratefully appreciated.

Thanks,
Tony

Hi Tony - I ran into similar problems when adding pages to the SiteMap, so on http://www.RenegadeSprints.org, I just used the ASP.net menu control for the second line. This may not be the way you want to go, but it's an option to consider and easy to format.

Ed


Hello Ed.

Thanks for your reply.

I have it working. I just need to know how to format it so that it looks nicer.

However, i will try your idea of adding a menu control. What did you use? The Toolbox\Navigation\Menu control?
and where did you put it on the Default.master? Right after the Repeater?

Thanks,
Tony
Jun 19, 2007 at 2:11 PM
Tony, Glad to hear you got it working.

I replaced the Repeater with Toolbox/ASP.NET Controls/Navigation/Menu and used another menu control for the second line of the top menu. It's been awhile since I made those changes and don't remember why I replaced the Repeater, but it probably had something to do with formatting.
Jun 19, 2007 at 4:16 PM
I'm simply trying to get the repeater to display the child nodes in my websitemap. I'm using this article as a reference: http://www.asp.net/learn/dataaccess/tutorial03vb.aspx?tabid=63

It's not going well. I'm not sure what I'm doing wrong. I'm surprised they didn't just include the code for any child nodes in the repeater in the first place. In fact, I can't seem to find an example for using a repater across teh top navigation. They all seem to be down the left side. Even just copying the example in the article without changing anything is resulting in a bunch of dots going down the left side of my screen. If anybody has a solution and would be willing to share, I'd be grateful.
Jul 16, 2007 at 4:48 PM
Tina, did you ever get this working? I am trying to do the same, I would like a couple of menu items to drop down on my site. Has anyone got a default master I can take a peek at?
Jul 16, 2007 at 5:32 PM
I did, but I really didn't like the way it looked, so I pulled it out. I'm sorry - I didn't even save a copy of it.
Jul 16, 2007 at 5:34 PM

Dazalock wrote:
Tina, did you ever get this working? I am trying to do the same, I would like a couple of menu items to drop down on my site. Has anyone got a default master I can take a peek at?


here is my default.master. This and a properly configured web.sitemap does the trick. Live site at: www.ogfutbol.org

<%@ Master Language="VB" %>
<%@ Register Src="UserControls/UsersOnline.ascx" TagName="UsersOnline" TagPrefix="uc1" %>
<%@ Register TagPrefix="ClubSite" TagName="HitCounter" Src="~/UserControls/HitCounter.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

If Not (IsPostBack) Then
'Display the number of users on the site
'ActivateUsers.Text = Application("activeUsers").ToString

'Configure the screen with web.config information
Dim ClubName As String = ConfigurationManager.AppSettings("ClubName")
Dim ClubSlogan As String = ConfigurationManager.AppSettings("ClubSlogan")
Dim ClubAddress As String = ConfigurationManager.AppSettings("ClubAddress")
Dim ClubCopyright As String = ConfigurationManager.AppSettings("ClubCopyright")

If Not (ClubName Is Nothing) Or ClubName <> "" Then
Label_ClubName.Text = ClubName
masterhead.Title = ClubName
Else
Label_ClubName.Text = "My Club Site"
masterhead.Title = "My Club Site"
End If

If Not (ClubSlogan Is Nothing) Or ClubSlogan <> "" Then
Label_ClubSlogan.Text = ClubSlogan
Else
Label_ClubSlogan.Text = "My Club Site tag line or slogan"
End If

If Not (ClubAddress Is Nothing) Or ClubAddress <> "" Then
Label_ClubAddress.Text = ClubAddress
Else
Label_ClubAddress.Text = "Club Address here"
End If

If Not (ClubCopyright Is Nothing) Or ClubCopyright <> "" Then
Label_Copyright.Text = ClubCopyright
Else
Label_Copyright.Text = "Copyright ©
Jul 16, 2007 at 6:28 PM
Mine didn't turn out like that, lol. It looked like crap. That's much nicer.
Jul 16, 2007 at 8:58 PM
That's a really nice menu, but i'm looking for a menu that extends to the second line.

I added an asp menu for the second line, but like Tina, i don't like the way it looks.

Thanks,
Tony
Jul 16, 2007 at 9:36 PM
Thanks rh, how did you get the drop downs working?
Jul 17, 2007 at 9:55 PM
Deleted the repeaters.
Drag and drop the asp.net menu control in their place.
Point it to the web.sitemap
Spent a great deal of time editting the web.sitemap so get it close to the way I wanted it to layout.

It still isn't perfect, but it works. I also spent some time tweaking the colors and vertical/horizontal spacing menu control. Just trial and error to get the lineup you prefer. I still am not sure about teh bottom menu control. I am thinking about reducing the number of sub menus displayed on that one.

If you need more details, let me know. I'd be glad to answer any questions.
Jul 18, 2007 at 12:39 AM
Hello RH.

Actually that's what i did. Except that i did tie the first line of the menu to a sitemapdatasource, but i used the Edit Menu items from the menu tasks to get the second line to display correctly.

It's still not the way i want it though. I can't get it to line up with the first line. Are you able to get yours to line up?

Thanks,
Tony
Jul 18, 2007 at 8:16 PM
tonyg,

I guess I am not sure what you did. Did you use a normal sitemap and manually create the sub menus or did you create them via the web.sitemap? My web.sitemap looks like:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="/" title="" description="" roles="*">
<siteMapNode url="default.aspx" title="Home" description="Welcome page" />
<siteMapNode url="####" title="News/Events" description="Club News" >
<siteMapNode url="news/list.aspx" title="News" description="Recent News" />
<siteMapNode url="events/calendar.aspx" title="Events" description="Calendar of events" />
<!--<siteMapNode url="locations/list.aspx" title="Locations" description="Event Locations" />-->
</siteMapNode>
<siteMapNode url="#" title="Statistics" >
<siteMapNode url="statistics/LadyWarriors.aspx" title="Lady Warriors" description="Lady Warrior Stats" />
<siteMapNode url="statistics/Warriors.aspx" title="Warriors" description="Warrior Stats" />
</siteMapNode>
<siteMapNode url="photo/list.aspx" title="Photos" description="Photo album" />
<siteMapNode url="member/redirect.aspx" title="Membership" description="Member registration" />
<siteMapNode url="Forum/Topics.aspx" title="Forums" description="Discussion Forums" />
<siteMapNode url="blogs/default.aspx" title="Blogs" description="Blog Posts" />
<siteMapNode url="links/links.aspx" title="Links" description="Useful links" />
<siteMapNode url="###" title="About Us" description="About Us" >
<siteMapNode url="##" title="Staff" description="Coaching Staff" >
<siteMapNode url="AboutUs/Lang.aspx" title="Coach Lang" description="Coach Jesse Lang" />
<siteMapNode url="AboutUs/Brown.aspx" title="Coach Brown" description="Coach Buzz Brown" />
<siteMapNode url="AboutUs/Smith.aspx" title="Coach Smith" description="Coach Clay Smith" />
<siteMapNode url="AboutUs/Langham.aspx" title="Coach Langham" description="Coach Paul Langham" />
<siteMapNode url="AboutUs/Blackmon.aspx" title="Coach Blackmon" description="Coach Blackmon" />
</siteMapNode>
<siteMapNode url="contacts/contacts.aspx" title="Contacts" description="Warrior Contacts" />
<siteMapNode url="AboutUs/History.aspx" title="History" description="Futbol History" />
</siteMapNode>
<!--
<siteMapNode url="####" title="Admin" description="Site Administration" roles="Administrators" >
<siteMapNode url="admin/adddownload.aspx" title="Downloads" description="Warrior Downloads" />
<siteMapNode url="admin/Email.aspx" title="Email" description="Email Members" />
</siteMapNode>
-->
</siteMapNode>
</siteMap>