WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2004, 10:24 PM
WebProWorld New Member
 

Join Date: Sep 2003
Location: Charleston, SC
Posts: 2
vigneron RepRank 0
Default importing a menu?

I want to be able to create a navigation menu (ie, hyperlinks), complete with whatever tags, javascript, or css (hover, eg) behaviors I might choose to use, and create/update it one place, rather than having to change it on every single page of a site.

Is there a simple cross-browser compliant way to import an html fragment (or whatever you want to call it) onto several pages like this, without requiring any plug-ins or supported database functions? My understanding is that an external javascript source file can't contain any html tags, so all I can import there is text without any kind of markup.

Thanks for any feedback :)
Reply With Quote
  #2 (permalink)  
Old 01-27-2004, 12:32 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

HI vigneron,

Welcome to WebProWorld !

Yes, you can do that. It's called SSI (server side includes) Do a search on google and you'll find lots of tutorials. Make sure your host supports it. most do

I would avoid javascript, though. Could run into trouble with search engines not being able to fully crawl your site
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #3 (permalink)  
Old 01-27-2004, 01:06 PM
WebProWorld Member
 

Join Date: Jan 2004
Location: Colorado
Posts: 59
disciple RepRank 0
Default

You could use php. I am no expert but I believe this would work. Your divs and all other formatting elements should be made up in css.

File called: site_menu.php // for an include file


Code:
<div>
<a href=>item one</a>
<a href=>item two</a>
<a href=>item three</a>
</div>
Then in the pages where you want the menu to show you would do the following.

Code:
<html>
<body>
<? include "{put your path to file here/site_menu.php"; ?>
</body>
</html>
__________________
Christian Web Hosting
Digitals
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum
Tags: ,



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

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


Search Engine Optimization by vBSEO 3.2.0