Click to See Complete Forum and Search --> : Simple Question...


BobDonut
12-10-2004, 10:33 PM
Hi all,

I have a question that should be really easy to answer, but I don't have the experience or exposure necessary, so I was hoping someone on this board could help me out.

I made a few personal "hobby" websites, so I am familiar with HTML. I am NOT a programmer or web developer by any means, however... so if you have an answer, pretend you're giving advice to a six year old. :D

My latest website is going to analyze many different gadgets and gizmos... so I want to make a template for the pages, and be able to easily create new pages. The problem is that the links inside the template will need to change often. So, the top of the pages is a menubar... one of the types that are like:

[ Home ] | [ Links ] | [ Page 1 ] | [ Page 2 ]

How should I make the template so that I can update that heading on all 50 or 100 webpages just by changing some code at a single source?

Is there a certain type of programming I should use? I'm not familiar with all types, and I'm not a real computer whiz, so easier is better.

THANKS IN ADVANCE!!

-BobDonut

Jupac
12-10-2004, 10:55 PM
no unslees you had the files included. but if you just have html on 100 differnt fiels then you cant

BobDonut
12-10-2004, 11:09 PM
Right, I know I can't do that with just HTML... my question is how do I do it using something else (something easy to learn), and what should I use? I haven't yet done the pages... I'm trying to do some planning in advance. Thanks.

-BobDonut

ray326
12-11-2004, 01:02 AM
The easiest way is server side includes (SSI).

BobDonut
12-11-2004, 08:35 AM
I just did a little research, and it came up that SSI might be better suited for "small amounts of data, such as the current time." I'm going to have about 20 - 30 links changing, possibly daily. In light of that, would CGI be better?

NogDog
12-11-2004, 02:37 PM
It's pretty easy to do with some sort of CGI program. I do it in PHP on my site. I have an include file that defines functions for generating the top and bottom of each page. Then on each content page I just need a few lines of code (like 3) to include the function file and call the two functions. Then if I want to change anything in the header or footer sections of my pages, all I have to do is change it once in the include file.

ray326
12-11-2004, 03:40 PM
Originally posted by BobDonut
I just did a little research, and it came up that SSI might be better suited for "small amounts of data, such as the current time." I'm going to have about 20 - 30 links changing, possibly daily. In light of that, would CGI be better? I guess you missed SSI include virtual, which does what nogdog suggests but with zero programming required.

ilya
12-11-2004, 05:09 PM
um..use a stylesheet..make images of the buttons and add a class to the links and in the stylesheet make a class and make a background-image thing for each button..then all you need to do is update those button imagesd..and they update on all pages

BobDonut
12-11-2004, 06:26 PM
OK, thanks everyone.

I went with PHP require, and it seems to be simple enough for me.

One problem I'm having, however, is that the include files are adding an extra space at the bottom of their respective tables, and it's throwing off the whole alignment!! ...so it's something like this...

INDEX.PHP
<table>
<tr>
<td>
<?php require ("www.blah.com/heading.html"); ?>
</td>
</tr>
</table>

HEADING.HTML
<table>
<tr>
<td>
Here are my heading links...
</td>
</tr>
</table>

So on the main page (index.php), it will show my heading links, with an empty line just below them before going on to the next row. I hope that made sense...

-BobDonut