Reply to topic
Questions on Includes
Brad


Joined: 23 Jun 2005
Posts: 14
Location: Davis CA
Reply with quote
Ok, I know I'm a dinosaur, but I liked frames. They made life so easy. Need a consistant menu? Build it in the frame on the side and put everything else on the other side. Need to change the menu? ONE place to change it.

Ok, so I'm TRYING to get to the 21st Century. But it will take time.

I have to admit, style sheets are pretty slick, and it's not that hard to build a BETTER looking menu that you could ever build in frames, but unless I've missed something, at this point if I have a menu change I've got to go back to EVERY BLASTED FILE!

I've tried the Include statement, and it works good assuming it's a shtml file.

Two questions - can I get an include to work in a plain .html file?

If not, how can I get the default www page to call up the first file? I tried index.shtml, but nothing came up.

or is there a BETTER way to have one point of change on my menus?
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 545
Location: Harrisburg, PA
Reply with quote
Chances are, you are using a server that has Coldfusion, PHP, ASP, Etc.

Try using an Include in one of those languages. The stuff inside the included file can be plain html.

Then you just include it in your pages like:

Coldfusion:
Code:
<cfinclude template="menu.cfm">


All files that use coldfusion includes must have .cfm extention.

PHP:
Code:
<?php include('menu.php') ?>


All files that use php includes must have .php extention.



If not, how can I get the default www page to call up the first file? I tried index.shtml, but nothing came up.


You'll need to order your default documents in your control panel to the order you want IIS/Apache to look for the files.

For example:
index.html
index.htm
index.php
index.cfm
index.asp
default.html
Brad


Joined: 23 Jun 2005
Posts: 14
Location: Davis CA
Reply with quote
Nope, straight wordpad. Beats vi... but mostly cause I'm out of practice with it (I DID mention I was a dinosaur) Smile
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 545
Location: Harrisburg, PA
Reply with quote
Try using Dreamwaver Very Happy
Questions on Includes
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic