Gossamer Forum
Home : Products : Links 2.0 : Customization :

Using SSI with Links 2.0

Quote Reply
Using SSI with Links 2.0
Hello - I've searched the forum and can't find the answer to my question - I'm wanting to include SSI with my Links templates - is this possible? I'm wanting to use the SSI for my main menu that I update often.

Thanks

Quote Reply
Re: Using SSI with Links 2.0 In reply to
Really? Search again using the following search options in the Forum Search Form:

1) Keywords: SSI Templates
2) Forum: Links 2.0 Customization Forum
3) Search Options: And
4) Date Range: All posts
5) Hits: 250

The red text is very important! ---this is a recording based on a greatest hit I posted in the Discussion Forum on December 11,2000---

Regards,

Eliot Lee
Quote Reply
Re: Using SSI with Links 2.0 In reply to
I kind of got it going - I'm trying to include by way of SSI a .txt file that is located at my site's root directory - so I'm including this tag: --#include file="http://www.mydomain.com/right_menu.txt"--

This doesnt work - I get this message - [an error occurred while processing this directive]

However - when I move the .txt file to the same directory as the .shtml file and change the path to --#include file="right_menu.txt"-- it works fine. Since the pages are built in various directories, etc., I obviously have to access the .txt file from a neutral location - so how can I have the .txt outside the same directory as the .shtml file and it still work?


Thanks


Quote Reply
Re: Using SSI with Links 2.0 In reply to
Instead of using SSI why not just use the include option on the enhanced templates mod.

Good Luck!

Glenn
Host Links
http://cgi-resource.co.uk/links
Quote Reply
Re: Using SSI with Links 2.0 In reply to
The link to the mod give a 404 - what is the correct URL? And - i'm so close to this working with SSI - any help you could give would be appreciated...

Quote Reply
Re: Using SSI with Links 2.0 In reply to
This is the url:

http://www.gossamer-threads.com/...es/Detailed/877.html

If your just including things like menu bars then you could just use the include option on the enhanced templates then you don't need to use SSI.

Good Luck!

Glenn
Host Links
http://cgi-resource.co.uk/links
Quote Reply
Re: Using SSI with Links 2.0 In reply to
Thanks - I'm finding no documentation with this mod - where is the documentation located? And I'm using external templates if this makes a difference. Regarding the SSI - is there another tag I could include that would access the external .txt file?

Quote Reply
Re: Using SSI with Links 2.0 In reply to
'I'm finding no documentation with this mod - where is the documentation located? '

None is needed... just open Template.pm and replace it all with the code shown on that page.

Good Luck!

Glenn
Host Links
http://cgi-resource.co.uk/links
Quote Reply
Re: Using SSI with Links 2.0 In reply to
Once I've installed the new script - then what? What do I open to use it? What tags do I used to call the external .txt file? And no ideas on a new tag to use the regular SSI call? :)

Quote Reply
Re: Using SSI with Links 2.0 In reply to
Quoted from the enhanced template resource page......

>>>>
Note: This parse() includes the changes for


<%include filename%>
<%ifnot variable%> text <%endif%>
<%if variable eq 'string'%> text <%endif%>
You can use the following operators for comparision: eq, =, lt, gt, >, <.
<<<<<

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: Using SSI with Links 2.0 In reply to
I have no idea what this means. I use external templates and simply want to include an external file - how can I do this either with an SSI (in view of my previous posts) or with this Template Mod?

Quote Reply
Re: Using SSI with Links 2.0 In reply to
Try it without the http://www.mydomain.com

<! --#include virtual="/headfoot/header10.txt" -->
and no space after the <!

where headfoot is the folder with your file or whatever your path is


If you create a .htaccess file in your root public_html folder with the following, you don't have to rename the html files to shtml. YMMV...

AddType text/x-server-parsed-html .html

Gene
Quote Reply
Re: Using SSI with Links 2.0 In reply to
Thanks Gene - but with all of the differing directories created by Links - how can I backstep to the .txt file I'm wanting to include? The backstep will be different for every directory...

Quote Reply
Re: Using SSI with Links 2.0 In reply to
Put your header.txt/footer.txt files in the templates directory then put this in your templates....

<%include header.txt%>

<%include footer.txt%>

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: Using SSI with Links 2.0 In reply to
Great - that solved it - thanks for all your help. Once I intalled the mod and put the .txt in my templates directory, everything worked fine. Thanks again!

Quote Reply
Re: Using SSI with Links 2.0 In reply to
Glad you got it to work...!

Just out of curiosity what is "backstep to the .txt file I'm wanting to include?"

And "The backstep will be different for every directory..." ?

"Backstep" is a new term to me.




Gene
Quote Reply
Re: Using SSI with Links 2.0 In reply to
Backstepping is easy:

eg.
<! --#include virtual="../left.shtml" -->


Quote Reply
Re: Using SSI with Links 2.0 In reply to
well, I've never called it that but I understand....

I did away with the "backstepping" when it came to links and the header/footer files ( which have my navigation menu, etc ). I just hard coded mine and it works just fine for me....

thus if it was in /public_html/menu_folder

code it as

<! --#include virtual="/menu_folder/left.shtml" -->

That is how I did mine and it works fine. I even moved the template files ( add.html, modify.html, etc ) from the cgi-bin/links/admin/templates folder to the /menu_folder folder. That way, I didn't have to have the header/footer files in two different places






Gene