Website Coding

Stuck on a line of code? Find resources and post your coding questions here.

Forum Sponsor (Advertise with us)
Reply
 
Thread Tools Display Modes
    #1 (permalink)  
Old 09-29-2009
forwardvision's Avatar
Contributing Member
Company name: Forward Vision Business Services
 
Join Date: Jul 2008
Location: West Midlands, UK
Posts: 126
Send a message via Skype™ to forwardvision
Question Using one HTML or Javascript template file for your website navigation menu
When you have multiple pages on your site, it can be a bit tedious to have to edit the navigation menu on each page, when you update your site.

Historically I've just used one HTML file with the navigation menu calling it something like, "navi-menu.htm" and then calling it in each other page with the line of code:

HTML Code:
<!--webbot bot="Include" U-Include="/navi-menu.htm" TAG="BODY" -->
That way, if I ever want to change the navigation menu options I only have to do it once, rather than changing every html file on the site.

This works great if you have everything in the root folder on your server. However, I've had problems with it when I start adding folders from the root folder and then sub-folders within those folders. I find it doesn't always find the navi-menu.htm file.

So my questions is: Does any one know of another way of achieving the same thing - using either HTML or Javascript?

Many thanks,

Jason
__________________
Jae Alexander Linsey - 2SupportU.biz
Administrative Support | Marketing Support | Networking Events
Reply With Quote
    #2 (permalink)  
Old 09-29-2009
Business-Bytes's Avatar
Resident Member
Company name: SunRise Virtual Solutions
 
Join Date: Jun 2009
Location: Iowa
Posts: 1,043
Blog Entries: 1
Send a message via Skype™ to Business-Bytes
Default Re: Using one HTML or Javascript template file for your website navigation menu
Hi Jason,

I have used a php include to do this. You use just one file where your menu resides, and a short snippet of php to include it on your site.

Not sure since it isn't javascript if you're interested.
__________________
Jules, SunRise Virtual Solutions - WordPress Customization & XHTML/CSS Web Sites
Reply With Quote
    #3 (permalink)  
Old 09-29-2009
forwardvision's Avatar
Contributing Member
Company name: Forward Vision Business Services
 
Join Date: Jul 2008
Location: West Midlands, UK
Posts: 126
Send a message via Skype™ to forwardvision
Default Re: Using one HTML or Javascript template file for your website navigation menu
Thanks Jules for your suggestion. However, I'm not familiar with php. I'm sure I could get a php navigation menu source code from a php library online somewhere and have a play around with it. Do you know any good sources?
__________________
Jae Alexander Linsey - 2SupportU.biz
Administrative Support | Marketing Support | Networking Events
Reply With Quote
    #4 (permalink)  
Old 09-29-2009
Business-Bytes's Avatar
Resident Member
Company name: SunRise Virtual Solutions
 
Join Date: Jun 2009
Location: Iowa
Posts: 1,043
Blog Entries: 1
Send a message via Skype™ to Business-Bytes
Default Re: Using one HTML or Javascript template file for your website navigation menu
Originally Posted by forwardvision View Post
Thanks Jules for your suggestion. However, I'm not familiar with php. I'm sure I could get a php navigation menu source code from a php library online somewhere and have a play around with it. Do you know any good sources?
These might help to get you started:
http://www.w3schools.com/PHP/php_includes.asp
http://allyourtech.com/content/artic...t_know_php.php

The beauty of using php over JavaScript is that some folks don't have JavaScript enabled, whereas php is server side, so no worries about that.

You can still use CSS to style and position the menu, etc.

Have fun!
__________________
Jules, SunRise Virtual Solutions - WordPress Customization & XHTML/CSS Web Sites
Reply With Quote
    #5 (permalink)  
Old 09-29-2009
forwardvision's Avatar
Contributing Member
Company name: Forward Vision Business Services
 
Join Date: Jul 2008
Location: West Midlands, UK
Posts: 126
Send a message via Skype™ to forwardvision
Default Re: Using one HTML or Javascript template file for your website navigation menu
Thanks Jules, I'll take a look at those links in the morning.

Regards,

Jason
__________________
Jae Alexander Linsey - 2SupportU.biz
Administrative Support | Marketing Support | Networking Events
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLOSED - HTML-savvy Virtual Assistant needed for website makeover [from template to traditional] VAF Admin Virtual Assistant Jobs 0 06-10-2009 10:25 PM
[Free Stuff] TODAY ONLY: Sothink DHTML Menu site navigation menu builder VAF Newsbot General Website Design and Development 1 05-05-2009 11:24 AM
[Question] Free Website Design Programs - no HTML knowledge required clrsecretarial General Website Design and Development 2 03-18-2009 03:39 PM
Sitewide Navigation Bar Help? KAElliott General Website Design and Development 3 02-01-2009 03:11 PM


All times are GMT -4. The time now is 11:20 AM.

International Virtual Assistants Association
Project Management for Virtual Assistants
Work from Home | Become A Virtual Assistant
Virtual Assistant Directory
Affordable WordPress Themes
Create a Professional New Client Welcome Packet
Virtual Assistant Forums Advertising

© Virtual Assistant Forums 2012
All content and images are protected under copyright law and may not be reproduced in any way without express written consent.