Gossamer Forum
Home : Products : Links 2.0 : Discussions :

More SHTML/Template problem

Quote Reply
More SHTML/Template problem
Ok. I have searched all of the threads and found a whole lot of information about how to include SSIs in your template files to format each page in Links 2.0.

I changed the appropriate entries in the links.cfg (*html --> *.shtml) and deleted the links directory and added it back. I then rebuilt the directory and all changed to .shtml.

Now. The only template file I have altered (testing) is modify.html. Here is the call:



header.cgi is a little script that I use to call the header file.

When I go to my links page (http://soapvoice.com/links) and click on modify, I just get the regular modify.html file. None of the formatting in my header file is available. I don't even get an error!

What have I overlooked? I have tried numerous paths.

My modify.html template is in /home/username/www/cgi-bin/links/admin/templates

and my header.cgi is located in /home/username/www/cgi-bin

I have even tried to do a simple include virtual, but no luck.

Any suggestions/ideas? I know you guys have had this question asked repeatedly and because I read all the posts. Nonetheless, I can't seem to get it to work for me. Thanks.

Jack

Administrator
SoapVoice.com!
Quote Reply
Re: More SHTML/Template problem In reply to
As discussed many times - you CAN'T use SSI in CGI GENERATED pages.

s;(.)(.);$2$1;g+s;\$; ;g+print,if $_='hOm$$yoG$doy$uiklldeK$neyn$,oy$uabtsra!d';

Quote Reply
Re: More SHTML/Template problem In reply to
Not that I know why one would want to use SSI to execute another CGI program from a CGI generated page (I mean you can do all of that with what is built into Links), but you can use SSI, if you hack the PERL code with something like this for example:

$output = qq~
<A HREF="< ! --# echo var="HTTP_REFERER"-->">Go Back</A>~ (spaces inserted so you can see command)

If this simple ECHO call works (and it does) then I don't see why all the other SSI commands wouldn't work.


Quote Reply
Re: More SHTML/Template problem In reply to
Why not use:

$output = qq|<a href="$ENV{HTTP_REFERER}">Go Back</a>|;

or even just

$output = qq|<a href="javascript:go(-1)">Go Back</a>|;



Installations:http://wiredon.net/gt
MODS:http://wiredon.net/gt/download.shtml

Quote Reply
Re: More SHTML/Template problem In reply to
Well, what you suggest makes more sense, I was only pointing out that SSI can be used, not that it is the best option.

Quote Reply
Re: More SHTML/Template problem In reply to
Ok. I'm confused. Now, I know you guys have covered this extensively in previous postings. But it's very difficult to patch together an answer to a question from 25 different posts. I did my best and still have a question. I am very much a layman, but learning fast.

If you could just please tell me (step by step) what the BEST way to get header and footer files included in the CGI generated templates (%header% variables in global?, etc.)

I have seen the many posts about this, but each one is but a fragment of the total answer. I will continue re-searching and rereading the posts. But if someone could just explain it as simply as possible, I would really appreciate it.



Administrator
SoapVoice.com!
Quote Reply
Re: More SHTML/Template problem In reply to
Bobsie provided complete codes in the Links 2.0 Customization Forum...

Search for Bobsie header footer

Regards,

Eliot Lee