Simple Machines Community Forum

General Community => Scripting Help => Topic started by: Tom on December 07, 2003, 10:06:03 AM

Title: Virtual Includes
Post by: Tom on December 07, 2003, 10:06:03 AM
(I'm quoting something from another topic here so I won't make it go too off toipc.)

Quote from: Tyris on December 04, 2003, 10:10:03 PM
using an include or something is what I used to do... have where the nav go's in each html page an <!-- virtual include="nav.html" --> or something (thats not it... but something like that)...

I'm trying to do something like this now. I've put <!-- #include virtual="links.html" --> on my page and made a "links.html" page,  but it just shows up blank where it is supposed to be.  :-\

Am I missing any steps or anything?
Title: Re: Virtual Includes
Post by: Tim on December 07, 2003, 10:32:19 AM
does your server support includes? And which code does it need for that?
Title: Re: Virtual Includes
Post by: Owdy on December 07, 2003, 10:34:53 AM
Is your page in .shtml format?
Title: Re: Virtual Includes
Post by: Tom on December 07, 2003, 10:39:13 AM
Quote from: Tim on December 07, 2003, 10:32:19 AM
does your server support includes? And which code does it need for that?

I don't know.

Quote from: Owdy on December 07, 2003, 10:34:53 AM
Is your page in .shtml format?

Yes.
Title: Re: Virtual Includes
Post by: Owdy on December 07, 2003, 10:57:36 AM
URL?
Title: Re: Virtual Includes
Post by: [Unknown] on December 07, 2003, 11:48:12 AM
Make sure you are using <!--#include virtual="path" --> not <!-- #include virtual="path" -->.  There should be no space between the <!-- and #.

-[Unknown]
Title: Re: Virtual Includes
Post by: Tom on December 07, 2003, 12:20:50 PM
Quote from: [Unknown] on December 07, 2003, 11:48:12 AM
Make sure you are using <!--#include virtual="path" --> not <!-- #include virtual="path" -->.  There should be no space between the <!-- and #.

-[Unknown]

That did it! It works now. Thanks.  :D