Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

HTML Include - Does it exist?

6 vues
Accéder directement au premier message non lu

Gordon Johnston

non lue,
8 mars 1999, 03:00:0008/03/1999
à
There is no HTML equivalent. To get that effect you need to use frames,
where the left frame holds your menu and this loads the pages into the right
frame.

--
Gordon Johnston
Programme Development Officer
URBAN European Initiative (Glasgow North)

URBAN on the web - http://www.urbangn.clara.net


rudd...@hotmail.com wrote in message <36e3fb5a...@news.flash.net>...
>Just wondering if there was an HTML equivalent to Cold Fusion's
><CFINCLUDE> tag?
>
>Basically I've got about 10 pages that all use the same sidebar
>(menu), and I'd like to create a single HTML file and have all the
>pages automatically pull the "external" file up whenever they are
>loaded. That way editing and changing the content of the Menu on one
>page would be much easier than making the same changes to 10 different
>pages.
>
>Thanks in advance!
>
>
>---------------------------
>Rudder
>email: rudd...@hotmail.com
>---------------------------

Daniel Vesma

non lue,
8 mars 1999, 03:00:0008/03/1999
à
You have to use Server Side Includes (ssi), search Askjeeves
(www.askjeeves.com) for "How do I use Server Side Includes", that should
give you what you need.

Daniel Vesma
www.thewebtree.com
www.thewebtree.com/daniel-vesma


rudd...@hotmail.com

non lue,
8 mars 1999, 03:00:0008/03/1999
à
I thought about that, but the people Im working for are trying to get
away from frame-based pages. Is there a way to do it with Javascript
maybe?

On Mon, 08 Mar 1999 16:41:53 GMT, "Gordon Johnston"
<urb...@clara.net> wrote:

>There is no HTML equivalent. To get that effect you need to use frames,
>where the left frame holds your menu and this loads the pages into the right
>frame.
>
>--
>Gordon Johnston
>Programme Development Officer
>URBAN European Initiative (Glasgow North)
>
>URBAN on the web - http://www.urbangn.clara.net
>
>

Joe Barta

non lue,
8 mars 1999, 03:00:0008/03/1999
à
rudd...@hotmail.com wrote:
>Just wondering if there was an HTML equivalent to Cold Fusion's
><CFINCLUDE> tag?
>
>Basically I've got about 10 pages that all use the same sidebar
>(menu), and I'd like to create a single HTML file and have all the
>pages automatically pull the "external" file up whenever they are
>loaded. That way editing and changing the content of the Menu on one
>page would be much easier than making the same changes to 10 different
>pages.
>
>Thanks in advance!
>
>
>---------------------------
>Rudder
>email: rudd...@hotmail.com
>---------------------------


Any multi-document text editor should be able to Search & Replace chunks
of code throughout multiple documents. Unless this is something you do
on a continual basis, this solution should easily do the trick. (If you
were to use NoteTab you could write a macro to to load the documents,
make the replacements and even upload the changed files... all with one
click. Even the free version of NoteTab is incredibly powerful.)

That said there is such a thing as Server-Side Includes that may offer a
solution with even more versatility. Others are more qualified than me
to explain that.

- Joe Barta

Johnnie ego

non lue,
8 mars 1999, 03:00:0008/03/1999
à
Gordon and Daniel together are correct, you could do this with a frameset,
or if you wanted singular pages with SSI or maybe HTMLScript. But not with
standard HTML.

John

John Lyons
egovision design
--------------------------
jo...@egovision.co.uk
http://www.egovision.co.uk
--------------------------

Art Sackett

non lue,
8 mars 1999, 03:00:0008/03/1999
à
rudd...@hotmail.com wrote:
> Just wondering if there was an HTML equivalent to Cold Fusion's
> <CFINCLUDE> tag?

There's nothing in HTML to do it, but you might be able to use
Server Side Includes -- depends on the server and its configuration.

http://www.artsackett.com/grey_papers/ssi/rest_of_us.html

Hope this helps!

---- Art Sackett ----
Independent Web Developer
http://www.artsackett.com

Sue Sims

non lue,
9 mars 1999, 03:00:0009/03/1999
à
rudd...@hotmail.com wrote:
>
> Just wondering if there was an HTML equivalent to Cold Fusion's
> <CFINCLUDE> tag?

Mostly. See
<URI:http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5>

I noted that the others responding said there was no HTML way to
'include' a file. Although the URI above does show there are two ways to
embed ('include') files, deployed implementations are so buggy as to
make <OBJECT> useless, and support for <IFRAME> is erm...available in a
severely limited number of UAs. YMMV

Arjun Ray

non lue,
9 mars 1999, 03:00:0009/03/1999
à
In <36E4719F...@worldnet.att.net>, Sue Sims

<Sue....@worldnet.att.net> wrote:
| rudd...@hotmail.com wrote:

| > Just wondering if there was an HTML equivalent to Cold Fusion's
| > <CFINCLUDE> tag?
|
| Mostly. See
| <URI:http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5>
|
| [...] Although the URI above does show there are two ways to embed
| ('include') files,

Not to mention, of course, that the way defined in the SGML standard
back in 1986 was specifically ruled out by the closest thing to a
Final Authority:)

<URL:http://www.dejanews.com/getdoc.xp?AN=259842602>

External entity declarations and data attributes on notations were
*designed* for this sort of thing. But we're in a world where people
seem to prefer reinventing wheels for themselves.

I suppose that's the easy way to convince everyone that everything is
"new" and therefore, er, "advanced".


:ar

Jukka....@hut.fi

non lue,
9 mars 1999, 03:00:0009/03/1999
à
On Mon, 08 Mar 1999 16:30:12 GMT, rudd...@hotmail.com wrote:

>Just wondering if there was an HTML equivalent to Cold Fusion's
><CFINCLUDE> tag?

There isn't.

>Basically I've got about 10 pages that all use the same sidebar
>(menu), and I'd like to create a single HTML file and have all the
>pages automatically pull the "external" file up whenever they are
>loaded.

There are many alternative approaches to this problem. One of them
(the one that I recommend) is to get rid of that sidebar, equipping
each page with a _link_ to a useful, full-size purely navigational
page. In a sense you would still have the inclusion problem (for the
link), but in a much smaller scale. (How often do you plan to change
such an essential link? And if you change it, you could use a simple
utility which performs a simple text replacement in a set of tiles.)

For the technical problem of inclusion, see
http://www.htmlhelp.com/faq/wdgfaq.htm#15

--
Yucca, http://www.hut.fi/u/jkorpela/ | http://yucca.hut.fi/yucca.html
People who quote signatures are really clueless.

Art Sackett

non lue,
10 mars 1999, 03:00:0010/03/1999
à
On 9 Mar 1999 00:54:46 GMT in alt.html Sue Sims <Sue....@worldnet.att.net> rattled the ether with:

SS: rudd...@hotmail.com wrote:
>>
>> Just wondering if there was an HTML equivalent to Cold Fusion's
>> <CFINCLUDE> tag?
SS:
SS: Mostly. See
SS: <URI:http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5>
SS:
SS: I noted that the others responding said there was no HTML way to
SS: 'include' a file. Although the URI above does show there are two ways to
SS: embed ('include') files, deployed implementations are so buggy as to
SS: make <OBJECT> useless, and support for <IFRAME> is erm...available in a
SS: severely limited number of UAs. YMMV

So, then, what you're saying is that had the rest of us qualified our
statements with "Well yeah, but not really 'cuz it doesn't work..." we'd
have been okay?

Just wondering if we aren't drifting off into an academic haze here... and
not meaning to be a nit-picky freak of nature ;-)

HAGO, Sue!

-- Art

Arjun Ray

non lue,
10 mars 1999, 03:00:0010/03/1999
à
In <0AmF2.32$h3.171...@news.frii.net>, Art Sackett
<asac...@artsackett.com> wrote:

| So, then, what you're saying is that had the rest of us qualified our
| statements with "Well yeah, but not really 'cuz it doesn't work..." we'd
| have been okay?

No, I think she said everyone *was* okay, by not mentioning something
that might have needed the disclaimer:)

:ar

Todd Lewis

non lue,
10 mars 1999, 03:00:0010/03/1999
à
Rudder:

As has been mentioned before, Server Side Includes (SSIs) ought to be
available on your server. General format looks like:

<!-- #include file="header.inc" -->

Note that any text file can be included (the .inc extension is not
necessary). Problems to look out for have to do with the file extension of
the calling page: most web servers map certain file extensions to the "SSI
interpreter." These file extensions usually include *.shtm and *.shtml.
The page that you want to place SSIs into must have one of these extensions
in order for the include to function correctly. Note that if you don't have
the proper file extension, then the line is ignored as an HTML comment; it
does not generate an error.

You can also "map" other file extensions to the SSI interpreter, depending
upon the abilities of the web server. In Microsoft Internet Information
Server, you can map specific file extensions. In Netscape SuiteSpot Server,
you can either choose to have *.shtm and *.shtml be processed by the SSI
interpreter, or every page. Obviously this second setting can cause a
performance hit on the server as plain HTML pages are processed needlessly.

Lastly, if you're looking for a total HTML solution, there is a workaround
through JavaScript. You can include a file of pure JavaScript into your
HTML page by specifying the "source" attribute of the SCRIPT tag. There are
a couple of provisos: the file must contain pure JavaScript, and it must
have the extension of .js. Here is an example of the SCRIPT tag:

<SCRIPT LANGUAGE="JavaScript" SRC="header.js"></SCRIPT>

You have to then format the HTML that you want to include into a bunch of
writeln statements. Here is what "header.js" might include:

<!--
document.write("<table border=\"0\" width=\"100%\" cellpadding=\"0\"
cellspacing=\"0\">");
document.write("<tr>");
document.write("<td width=\"30\" bgcolor=\"#0000FF\"
height=\"30\">&nbsp;</td>");
document.write("<td bgcolor=\"#0000FF\" height=\"30\">&nbsp;</td>");
document.write("<td width=\"30\" bgcolor=\"#0000FF\"
height=\"30\">&nbsp;</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width=\"30\" bgcolor=\"#0000FF\">&nbsp;</td>");
document.write("<td>");
// -->

This script writes the opening table tags for a border. There would be a
corresponding footer included later in the main page.

I like to refer to this method as "CSIs" for Client Side Includes. The only
drawback to this method is that it seems to crash Internet Explorer 3.0x.
--
Very respectfully,
Todd Lewis
http://www.westerndigital.com
(reply-to altered)


rudd...@hotmail.com wrote in message <36e40253...@news.flash.net>...

Sue Sims

non lue,
10 mars 1999, 03:00:0010/03/1999
à
Art Sackett wrote:
> ...

> So, then, what you're saying is that had the rest of us qualified our
> statements with "Well yeah, but not really 'cuz it doesn't work..." we'd
> have been okay?

Erm...not really. If someone who had been told there was no way to
'include' a file had then read the recommendation, they might actually
have got excited to find both <OBJECT> and <IFRAME>, spent hours
updating pages with these nifty SSI replacements, only to find they
didn't work as expected. (cough) I try to answer questions completely,
with caveats, to avoid misunderstanding. YMMV
...
> HAGO, Sue!

Surely, once I find my way out of this academic haze...

Mark Shaffer

non lue,
11 mars 1999, 03:00:0011/03/1999
à
How's about

<LAYER SRC="content.html"></LAYER>


On Mon, 08 Mar 1999 18:52:29 GMT, Art Sackett
<asac...@artsackett.com> wrote:

>rudd...@hotmail.com wrote:
>> Just wondering if there was an HTML equivalent to Cold Fusion's
>> <CFINCLUDE> tag?
>

>There's nothing in HTML to do it, but you might be able to use
>Server Side Includes -- depends on the server and its configuration.
>
>http://www.artsackett.com/grey_papers/ssi/rest_of_us.html
>
>Hope this helps!
>
>---- Art Sackett ----
>Independent Web Developer
>http://www.artsackett.com

Mark Shaffer

Enter a tiger's cave
and stroke its whiskers!
ICQ: 22409651
http://www.newwave.net/~marks/

Ser...@interrod.com

non lue,
12 mars 1999, 03:00:0012/03/1999
à
Ask Jeeves is a great search tool. They have a new domain name --

http://www.ask.com

Askjeeves.com still works but I think they're making the transition to
ask.com.

Serene

In article <36e40...@news.thefree.net>, daniel...@thewebtree.com
articulates that...

Daniel Vesma

non lue,
13 mars 1999, 03:00:0013/03/1999
à
0 nouveau message