Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Is it possible...

Quote Reply
Is it possible...
Is it possible to include HTML header, footer and left/right navigation files into links2 templates?

I would like to use global headers, footers and navigation for all pages on a site including non-links2 pages.

I would also like to be able to update/modify these files in one central location, namely the main directory for the web site.

I'm comfortable with SHTML includes but have no knowledge of CGI.

For instance: A file in siteB, "left_nav.html" would ordinarily be called into "example.shtml" which resides in a separate folder as:

<!--#include file="http://www.siteb.com/left_nav.html" -->

What would this be, if I wanted to include the same file in the "category.html" template for example?

Once again, I crave your indulgence in my posting what may seem a pretty simplistic question to programmers.

Tongue
-------------------------------------------
I Am What I AM (Not a Programmer)

Last edited by:

galfriday: Jan 27, 2003, 7:10 PM
Quote Reply
Re: [galfriday] Is it possible... In reply to
yep, I do that on my site. I have a left and right navigation menu and top header and bottom footer. All called by includes. The page itself is 5 columns with cols 2 and 4 only 15 pixels wide. Make sure you set up the "shell" first or things get confusing.

First, I had to move the html pages out of the cgi folder. As I recall, it gave me an error otherwise. I just set them up in a sub folder under the public_html folder.

Second you have to install the new template parser in the resource section to use the <%include leftcol.html%>.

in the cgi generated pages use
Code:
<%include leftcol.html%>


in the non-cgi-generatated pages use

Code:
<!--#include virtual="/htm/leftcol.html" -->

<!--#include virtual="/htm/bookmark.txt" -->

(or bookmark.html if you plan on using other SSI calls ).

By using the htaccess file I was able to use html instead shtml

I didn't think you coud use file="http://www.siteb.com/ as part of the #include...?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."

Last edited by:

esm: Jan 27, 2003, 8:33 PM
Quote Reply
Re: [esm] Is it possible... In reply to
Hello Gene.

I won't even pretend to know how to do this but I'm elated that it's not a far-fetched idea. Smile

I'll relay this to the real programmer who is helping me with this.

Many thanks for your kind feedback.

Best Regards....

Last edited by:

galfriday: Jan 27, 2003, 8:24 PM
Quote Reply
Re: [galfriday] Is it possible... In reply to
here is an old one but you get the idea....

enough to get you started

the cgi pages would be <%include file.html%>


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Is it possible... In reply to
uber cool! Cool

it's alchemy....

thanks Gene!
-------------------------------------------
I Am What I AM (Not a Programmer)