Rather than copy and paste the footer into each of the pages, I am wondering
if I could do some sort of include.
I am thinking maybe I could create a footer.html document in the directory
and then just add some sort of include statement at the tail end of each of
the 30 pages.
Something like the following (which I just made up out of my head):
<include ./footer.html>
I don't want to use stylesheets, javascript, server side includes or anything
like that. I just want to use simple HTML, preferably an early version for
maximum compatibility with traditional web browsers.
Does HTML provide such a facility? Can anyone give me an example of the tag
I should use?
--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/
http://lmgtfy.com/?q=html+include
--
Ed Mullen
http://edmullen.net
If the world was a logical place, men would ride horses side-saddle.
I did google it. The top links were server side includes, php, asp, and some
macros specific to web servers. I think the problem was that I was looking for
a tag.
Anyhow, I made some progress.
I stumbled across a thing called an iframe, which allows me to include text
from another file. I tried this, but the generated frame was way too big on my
browser (iceape). I reduced the size of the frame using the height attribute,
but this caused scroll bars to appear (even though the content outside of
the scroll area was just whitespace that had been generated by the browser.)
I then added an attribute to remove the scroll bar, but the content in the
frame slowly worked its way out of the top of the frame into invisibility as I
scrolled up and down the main page, and I could not force this back into focus
from the browser. There were also other problems when the page magnification
was adjusted. Also the iframe attribute only works on certain browsers. In the
end I decided to go for copy and paste.
Mark.
You do not have to paste *by hand* into every page, you can do this with
a replace function over all the files in a folder in a good editor.
Just for a footer and with not a million pages, this is fine. But when
you get to more complex things like navigation lists, you should
consider includes and php ones at that.
iFrame (an *inline* element) seems a lot of trouble to go to for just
this (and there *are* ways to configure them a bit) but what browsers
don't support them that you saw?
--
dorayme
> You do not have to paste *by hand* into every page, you can do this with
> a replace function over all the files in a folder in a good editor.
Additionally, a *really* good editor will have an include function of
its own. One such editor is BBEdit - I've made great use of its include
function, using it to create and publish over 1400 static pages per
week at one point.
This was for a site that averaged over a million hits per day, for
content that was only ever updated on a weekly basis, so creating the
pages dynamically would have been impractical and unnecessary - YMMV.
sherm--
The OP is on Linux, don't think he is going to by a Mac and an editor
just to do this. Anyway, just about *all* but the most barebones hosting
included some form of server side processing. Other than an
preprocessor, a form of server side includes is the way to go.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
I did have in mind my editor which *is* BBEdit, but I have not looked at
all the more sophisticated functions.
You are such a geek, Sherm! You will be model for a geeky character in
my next crime thriller. Don't worry, if you are a good boy here, I might
make you a good guy there. <g>
--
dorayme
> Sherm Pendley wrote:
>> dorayme<dorayme...@optusnet.com.au> writes:
>>
>>> You do not have to paste *by hand* into every page, you can do this with
>>> a replace function over all the files in a folder in a good editor.
>>
>> Additionally, a *really* good editor will have an include function of
>> its own. One such editor is BBEdit - I've made great use of its include
>> function, using it to create and publish over 1400 static pages per
>> week at one point.
>
> The OP is on Linux, don't think he is going to by a Mac and an editor
> just to do this.
I did. ;-)
No, seriously! I didn't own a Mac at that point, but my experience with
BBEdit, together with Apple's switch to a Unix-based OS, is the reason
I bought one. Back in the day, before Windows was the de facto standard
desktop, it was often said that one should choose the app one wants to
use, then choose a computer that would run them - in my case, that is
quite literally what I did.
> Anyway, just about *all* but the most barebones
> hosting included some form of server side processing.
Ours did too - it was a pretty standard Apache + MySQL setup, although
it was running on Solaris rather than Linux. But, the site was for a
nonprofit (PBS) with a limited budget. It received millions of hits a
day, and generating pages on the fly seemed very wasteful for content
that was only updated on a weekly basis.
Nowdays I'd probably just use an SSI and stick a cacheing server up
front, but this was a long time ago. Times have changed. ;-)
> Other than an
> preprocessor, a form of server side includes is the way to go.
Most of the time, sure. There are alternatives that might be preferable
in exteme circumstances though - just throwing one of them out there.
sherm--
Oh! This should be a fun read! :-D
--
Ed Mullen
http://edmullen.net
Guys, just because you have one, doesn't mean you have to be one.
> You could make a new image (#2) of the table containing the text and the
> old image (#1), and use that new image (#2) instead of the original data.
>
> Then you would just add<img src="image_number_two.gif" /> to each file,
> which is exactly the same as using your hypothetical<include file> tag
> (except that is isn't quite the same of course).
Ugh! Absolutely and *image* of a webpage is *not* a webpage. This is a
terrible idea akin to those slice-n-dice ImageReady sites...
: <include ./footer.html>
You could make a new image (#2) of the table containing the text and the
old image (#1), and use that new image (#2) instead of the original data.
Then you would just add <img src="image_number_two.gif" /> to each file,
which is exactly the same as using your hypothetical <include file> tag
(except that is isn't quite the same of course).
Various tools can create such an image from your data, but if all else
fails then display the original data in a browser (table, text and image
#1) and take a screen shot to get an image of it all together.
$0.10
Personally I suspect I would use perl to splice correct lines into the end
of each file.