------------------------------------------------------------------------------- One method of doing Frames (aka Netscape v2). The inital frame document needs to have a default non-frames document while most of this information is also stored in various sub-frame documents used. The problem is ensuring all these documents line up, so they contain the same indexing and data, as appropriate. EG: Frames document... =======8<--------CUT HERE----------axes/crowbars permitted--------------- Framed Document <!-- a copy of the Index Links here (without a top document link) --> <!-- a copy of parts of the Top Document --> =======8<--------CUT HERE----------axes/crowbars permitted--------------- Rather than duplicate the information in multiple places, and asking for trouble... Wirth's Rule: Never store data in more than one place, sooner or later you will update one and not the other. I created a C Perprocessed file and use #ifdef lines to mark out to what file information should be placed. Then I use CPP commands like the following to generate the various documents. /usr/lib/cpp -undef -P -DFRAME Doc.cpp | sed '/^$/d' Document.html /usr/lib/cpp -undef -P -DINDEX Doc.cpp | sed '/^$/d' Index.html /usr/lib/cpp -undef -P -DTOP Doc.cpp | sed '/^$/d' Top.html The sed part about is not needed but included to remove extra blank lines generated by cpp. Other documents types can be generated from a common source. I could have used m4 for this putpose, but found that m4 is more suited to full marco applications and has troublesome quoting. It is especially annoying to have a marco expanded when no marco was intended, particular m4's builtin marcos. Cpp is clean, and line based making it quick and simple to block out various parts.. Here is a Cpp Example for the above... This was cut down from the Frames method I use for the WWW AIcons section. See the mirrors from http://www.cit.gu.edu.au/images/Images.html =======8<--------CUT HERE----------axes/crowbars permitted--------------- /* Doc.cpp (example frames cpp file) ** ** This is C Proprocessor generator to split this source file into ** a netscape ``FRAMES'' compatable set of files. ** ** Example File Generation... ** /usr/lib/cpp -undef -P -DFRAME Doc.cpp | sed '/^$/d' Document.html ** /usr/lib/cpp -undef -P -DINDEX Doc.cpp | sed '/^$/d' Index.html ** /usr/lib/cpp -undef -P -DTOP Doc.cpp | sed '/^$/d' Top.html ** ** Anthony Thyssen 20 April 1996 */ Framed Document /* Frame Format if possible */ #if ! defined(INDEX) && ! defined(TOP) && ! defined(EXT) #endif #if defined(INDEX) <BASE TARGET="main"> #endif /* Document Title */ <BODY> <NOBR> #if defined(INDEX) <!-- short header for index --> <H1>Doc Index</H1> #elif defined(TOP) <!-- Large header for top sheet --> <H1><IMG SRC="symbol.gif" ALIGN="middle" ALT="[Symbol]" WIDTH=64 HEIGHT=54> Document Top Sheet (Framed)</H1> #else <!-- header for non-frame browsers --> <H1><IMG SRC="symbol.gif" ALIGN="middle" ALT="[Symbol]" WIDTH=64 HEIGHT=54> Document </H1> <CENTER><H3>Frameless browsers rule OK!''</H3></CENTER> #endif </NOBR> /* General Links (in index) */ #if defined(FRAME) || defined(INDEX) <A HREF=".." TARGET="_top"> <IMG SRC=back.gif ALIGN="top" ALT="" WIDTH=16 HEIGHT=16> Up to Parent</A> <BR> <P> #endif /* Mirror Links (in top) */ #if defined(TOP) <H3>Mirrors of This Document</H3> <BLOCKQUOTE> #endif #if defined(DEFAULT) || defined(TOP) <!-- Mirrors links here --> #endif /* Main Document Links (index) */ #if defined(FRAME) <H2>Chapters</H2> <BLOCKQUOTE> #elif defined(INDEX) <A HREF="Top.html"><B>Top Page</B></A><P> #endif #if defined(DEFAULT) || defined(INDEX) <!-- links to other sub-frame documents --> #endif #if defined(FRAME) </BLOCKQUOTE> <HR><P> #endif /* Main Welcome (top) */ #if defined(FRAME) || defined(TOP) <H2>Top Sheet Blurb Heading</H2> <!-- The rest of the top sheet info --> <HR><ADDRESS><NOBR> Dated: 20 April, 1996<BR> Author: <A HREF="https://antofthy.gitlab.io/anthony.html" >Anthony Thyssen</A>, &lt;Anthony.Thyssen&#64;gmail.com&gt;<BR> </NOBR></ADDRESS></BODY> #if ! defined(INDEX) && ! defined(TOP) #endif =======8<--------CUT HERE----------axes/crowbars permitted--------------- -------------------------------------------------------------------------------