Editing Website Template Menus

Setting up The Menus


Once you have downloaded your template you will probably want to change the menu names or add and remove pages. The menu in AllWebCo templates is controlled by the "menu.js". You will want to edit this file in Notepad or a Simple Text editor. All Allwebco templates are setup this way or in a very similar fashion.

Changing Link Names:
Open the menu.js in Notepad and look for a line similar to one of the menu styles below. One part needs to be edited to change the button name. Change the code highlighted in red.


Menu Style #3 (Most newer template models):
View
document.write('<a href="about.htm">About</a><br>');
document.write('</td><td align="center">');



Menu Style #2: (Obsolete)
View
document.write('<img src="picts/spacer.gif" HEIGHT=5 WIDTH=15><a href="contact.htm">contact</a><br>');



Menu Style #1: (Obsolete)
View
document.write('<input type="submit" value="Contact" onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');





Adding a Link and a New Page:
Open the menu.js in Notepad and look for some lines similar to one of the styles below. Select the lines of code, choose "edit", "copy" then select somewhere below the lines and choose "paste". This will create a new link or button. Then, you will need to change the link or button name as well as the page name .htm code. In other words, every button or link has two parts to change after pasting. Change the code highlighted in red below. You can then either rename one of the current .htm pages or create a new page by copying and pasting a page similar to the one you want to use. Be sure the "page_name.htm" that you create and the button .htm code (in red below) match exactly. The web is case sensitive.


Menu Style #3 (Most newer template models):
View
document.write('<a href="about.htm">About</a><br>');
document.write('</td><td align="center">');



Menu Style #2: (Obsolete)
View
document.write('</td></tr><tr><td ALIGN=left VALIGN=center background="picts/background-link.gif" height="23">'); document.write('<img src="picts/spacer.gif" HEIGHT=5 WIDTH=15><a href="about.htm">about</a><br>');



Menu Style #1: (Obsolete)
View
document.write('</td></form><form action="about.htm"><td>');
document.write('<input type="submit" value="About" onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');





Removing a link or page:
Open the menu.js in Notepad and look for a group of lines similar to the ones above. Simply delete them. In Art gallery templates you will remove one line only. There may be problems removing the first or last link. It's best to replace those instead (see above) and delete a different link.

IMPORTANT NOTE FOR OLDER TEMPLATES:
If you have edited the very first link in the menu this may cause a problem because of the coding. You might get the wrong page to show up even though you have edited correctly. Look for the button name to have a <form action="page_name.htm"> before and a </form> after. These are called tags. Once a tag is opened it usually needs to be closed. Like this:
<font color="green">some text</font>



Related Topics:
Links Not Working After an Edit
Buttons are Too Long
Adding and Removing Pages
Getting Started
Editing .js Files


Allwebco Template Support


Allwebco Website Template Support


For Drop Menus
Vertical CSS Drop Menus
Horizontal CSS Drop Menus



Notes:
Be sure to make a backup of the menu.js before you start editing, and also backup every few edits.



Allwebco Web Templates
Complete websites with built in scripts.
AllwebcoDesign.com
Website Templates
Free Javascripts
Free scripts for any website or template.
Allwebco-Templates
Web Template Support
Mobile Business Website Templates
Mobile optimized HTML5 websites.
AllwebcoDesign.com
Website Templates
Shopping Cart Templates
Professional templates with built-in Paypal.
AllwebcoDesign.com



Website Template Support
Website Template Support