Author Topic: A news template with SSI's ...  (Read 1518 times)

0 Members and 1 Guest are viewing this topic.

Offline alex

  • Newbie
  • *
  • Posts: 2
A news template with SSI's ...
« on: November 13, 2007, 08:08:34 AM »
Hi:

I have a news story template that has two executionable includes in it ... the template was saved as an ASP file and works fine with the newsscript ... but it fails to execute the ssi's

<!--#exec cgi="../cgi/randomtext/random_text.pl"-->

I noted you had a basic explaination of a work around in the FYI file that was with the script ... but could you explain this a little better?  I was unable to see what you were saying there ...

Thanks.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: A news template with SSI's ...
« Reply #1 on: November 13, 2007, 09:48:15 AM »
We referred to this:

Quote
Using HTML includes

It is now possible to use HTML includes from the template.  Once you configured this, the script will replace each of occurence of [[includex]] by the corresponding HTML page/file.  To use the feature, set the following option to 1 :
my $use_includes = 0;

If you want the script to cast an error when one of the templates could not be loaded, then set this value to 1:
my $error_on_missing = 0;

You can start defining which includes the script can use:
my %INCL=();
$INCL{'include1'} = "main-menu.htm";
$INCL{'include2'} = "main-menu.htm";
$INCL{'include3'} = "main-menu.htm";
$INCL{'include4'} = "main-menu.htm";
$INCL{'include5'} = "main-menu.htm";

Also read the chapter "Using HTML includes in one of the templates" further down the instructions.

But this only works for including static html files, not scripts.  So I am not sure whether I can help you on this one.  Maybe someone has some javascript trick that would do?

BTW: including your SSI in an iframe might work...

Offline alex

  • Newbie
  • *
  • Posts: 2
Re: A news template with SSI's ...
« Reply #2 on: November 13, 2007, 10:29:53 PM »
Using an iFrame did not work ... and my $use_includes = 0; is in the FREE version or the just the Xtra version???

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: A news template with SSI's ...
« Reply #3 on: November 14, 2007, 03:38:48 PM »
$use_includes is in the XTra version.  But do mind that it only works for static html includes, not scripts.