Top Menu?

Topics: ASP.NET 2.0, Controls
Nov 5, 2009 at 1:02 PM

I understand how to add a new link to the top menu but is there a way to change the Contact link to read Contact Webmaster, it seems it is hardwired to a label, can I change this and where would I do that.

Thanks for your help.

Nov 5, 2009 at 4:09 PM

Hi jerrysdean43,

That top menu is wired up to change depending on a visitor's language preference (which is a good thing), and is dependent on the individual theme.  The usual link (in the site.master page of the theme you're using) is like so:

<li><a href="<%=Utils.AbsoluteWebRoot %>contact.aspx"><%=Resources.labels.contact %></a></li>

If you changed the link to this:

<li><a href="<%=Utils.AbsoluteWebRoot %>contact.aspx">Contact Webmaster</a></li>

you would accomplish changing the displayed text to "Contact Webmaster", but it would say that for every visitor, even those who do not understand English.

If you wanted to change it to "Contact Webmaster" for English speakers but but to still allow it to translate "Contact" to other languages, you could edit the Value column in the Contact row of the labels.resx file that you'll find in the App_Global Resources folder.  Changing that field to say "Contact Webmaster" would cause the menu to display "Contact Webmaster" in English, but still translate "Contact" to other languages.

-GayLyn

Nov 5, 2009 at 4:34 PM

Thank you , I was close to this solution, I just had the incorrect resx file and was receiving an error, works great now.