Re: Including content of one file of HTML in another?

Subject: Re: Including content of one file of HTML in another?
From: Arlen -dot- P -dot- Walker -at- jci -dot- com
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Wed, 19 Dec 2001 15:07:41 -0600

>I do not know if the server she wants to do this on offers Server
>Side Includes or not. She has HomeSite and Dreamweaver at her
>disposal, but would rather not do wholesale search-and-replace
>to make the same navbar change in each of N files in the site.
>
>Any suggestions of where to look?

Easy way to tell is to create an SSI file with an .shtml extension and see
if it works. SSI is by far the easiest way to do this, however, there are
an abundance of other ways.

If it's apache with mod_perl installed, there was an article in an back
issue of the perl journal which did precisely that, used perl to create a
top navbar for the page. This can also be done with PHP, and I believe it's
possible in the later versions of ASP as well. I think you can do it with
Cold Fusion as well, but I'm not to familiar with that and so I could be
wrong there. The advantage of doing this through server-side scripting
rather than via an include is that the navbar can be a little more
intelligent -- it can leave out a navbar link that simply points to the
current page, for example.

It's possible to do something very like this in javascript as well, and
include the javascript. But then you have to face the prospect of all those
people who surf with javascript turned off; if that's your navigation bar,
then you've left them without any means to navigate your site; not a Good
Thing, alas.

Front Page and Dreamweaver (neither one puts out standard-compliant code;
no WYSIWYG tool does -- that's what makes debugging their output so much
fun sometimes) both have facilities which almost do this. I say *almost*
because if you're working on your local machine, then after debugging
uploading to the main server, you'll have to upload the entire site, not
just an include file, because they put the code into each and every
individual html file.

Were it me, I'd do it with a perl script invoked by an "<--include virtual"
SSI command. Neat, clean, all the load's on your server rather than making
the client download the script and it works no matter the browser version.

Have fun,
Arlen
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

Arlen -dot- P -dot- Walker -at- JCI -dot- Com
----------------------------------------------
In God we trust; all others must provide data.
----------------------------------------------
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Collect Royalties, Not Rejection Letters! Tell us your rejection story when you
submit your manuscript to iUniverse Nov. 6 -Dec. 15 and get five free copies of
your book. What are you waiting for? http://www.iuniverse.com/media/techwr

Have you looked at the new content on TECHWR-L lately?
See http://www.raycomm.com/techwhirl/ and check it out.

---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: Re: Batch conversion of Canvas files
Next by Author: RE: Including content of one file of HTML in another?
Previous by Thread: RE: Including content of one file of HTML in another?
Next by Thread: Including content of one file of HTML in another?


What this post helpful? Share it with friends and colleagues:


Sponsored Ads