Include Statements and Updating Files

Michael Squires (michael) michael at sequent.com
Thu Mar 12 18:20:09 EST 1998


	-----Original Message-----
	From:	Paula Sillars [SMTP:libr043 at cantva.canterbury.ac.nz]
	Sent:	Thursday, March 12, 1998 1:11 PM
	To:	Multiple recipients of list
	Subject:	Include Statements and Updating Files

	We have just recently started using include statements for commonly
	repeated elements within our web pages. This will hopefully save us
	a lot of time with constant updating elements like navigation
	buttons etc.

	The problem comes when our staff wish to update a file. Usually they
	save the document source in Netscape Navigator (version 2.02 for
OS/2),
	edit it and then send it to me to put up on the server.

	Unfortunately with include statements these get substituted with the
	text that should be included so when I receive the file for
	updating, I need to edit out the code that shouldn't be there and
	put the include statements back in.

	An example of one of our pages with three include statements is
http://library.canterbury.ac.nz/serials/ej/biology.shtml

	Can anyone suggest a way of saving the file as it really is, with 
	include statements intact?

	Thanks in advance.

	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Paula Sillars      x8602

	A day without sunshine is like, night.

	Unless you want to do this manually a lot, you need to provide a way
for people to grab the pages for editing in a way that doesn't expand the
#include. One of the easiest ways to do this is by running an FTP server on
the same tree that you run your web server on. Then, if you are looking at
page http://myserver/dir1/foo.html and want to edit the file, you just change
the "http" in the URL to "ftp" and pull it down for editing.

	Running an FTP server can be a problem if you are trying to secure
any of your pages via web server security, since ftp will have it's own model
of security. But if you don't have that constraint it's an easy way to go.

	Even if you do this you'll still have people who screw up and pull it
down with the #include expanded. A couple of thoughts there:
		1. put some HTML comment lines in your include file that will
help you spot where you need to do your manual edit
		2. teach your authors about this and have \them/ edit the
pages to put in the #include - that way if they screw up then they get to fix
it - becomes self-limiting real quick!

	Good luck,

Michael Lee Squires
Digital Library Champion





More information about the Web4lib mailing list