Help with virtual includes

They have: 14 posts

Joined: Nov 2000

I have been using virtual includes in some of my web pages and they work great as long as the .shtml include is in the same directory. How do you reference the include from a page in a different directory.
What I have been using <#include virtual="info.shtml">
Thanks.

Jaiem's picture

They have: 1,191 posts

Joined: Apr 1999

I use lots of INCLUDES on my sites. To help organize things I make a sub-directory to hold all my included files. On my servers I just have to say #include virtual="/directory/file". Should work on yours too.

They have: 21 posts

Joined: Nov 2000

Hi srgray:

You access includes the same way you access images. If you have an include named info.shtml and you want to include it in a file in "/myfolder", you would use:

<#include virtual="../info.shtml">

Jon.

Jon Steele -
EverySolution.com

mjames's picture

They have: 2,064 posts

Joined: Dec 1999

Quote: Originally posted by Jaiem
I use lots of INCLUDES on my sites. To help organize things I make a sub-directory to hold all my included files. On my servers I just have to say #include virtual="/directory/file". Should work on yours too.

Exactly... we do that, too. Just create a directory like /ssi or something. Organization is a big plus.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

hey jonsteele, welcome to TWF!
always glad to see new faces (or screen names Smiling)

They have: 14 posts

Joined: Nov 2000

Thanks to all-worked great.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.