Gossamer Forum
Home : Products : Links 2.0 : Customization :

question about non-ssi include

Quote Reply
question about non-ssi include
I'm attempting to do an include of a file into a cgi-generated "detail" page that's a cross between widgetz' detailed.cgi. and eliot's siteofday. The URL of the file I'm including is in the URL field.

this is what I have so far:
Code:
sub articleinclude {
my %rec = @_;
open (INC, "$rec{'URL'}") or return "Can't find include file:
Article file{$_}";
return join ("", <INC> );
}


sub site_html_article {
# --------------------------------------------------------
# This routine will build a single page per link. It's only
# really useful if you have a long review for each link --
# or more information then can be displayed in a summary.
#
my %rec = @_;
my $template;
# Set the appropriate template file to load
if ($category_name =~ "Outside_Resources/Websites/") {
$template = "article.html"; }
else { $template = "article.html"; }
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});
($rec{'isPick'} eq 'Yes') ? ($rec{'isPick'} = 1) : (delete $rec{'isPick'});
return &load_template ( $template, {
total => $total,
grand_total => $grand_total,
title_linked => $title_linked,
# articleinclude => &articleinclude,
%rec,
%globals
} );
}
it's called from a detailed.cgi type file called article.cgi. I'm getting "Can't find include file: Article file{} on the page, I can't seem to figure out what's wrong. I'm sure it's something simple & dumb that I did wrong, anyone know what the problem might be?

[This message has been edited by ladyofdragons (edited February 17, 2000).]
Subject Author Views Date
Thread question about non-ssi include ladyofdragons 1521 Feb 17, 2000, 3:36 PM
Post Re: question about non-ssi include
Eliot 1495 Feb 17, 2000, 4:15 PM
Post Re: question about non-ssi include
ladyofdragons 1494 Feb 17, 2000, 6:11 PM
Post Re: question about non-ssi include
Eliot 1494 Feb 17, 2000, 6:25 PM
Post Re: question about non-ssi include
ladyofdragons 1498 Feb 18, 2000, 2:31 AM
Post Re: question about non-ssi include
ladyofdragons 1505 Feb 25, 2000, 3:29 AM
Post Re: question about non-ssi include
skareem 1501 Mar 23, 2000, 10:51 AM
Post Re: question about non-ssi include
Stealth 1497 Mar 26, 2000, 5:44 PM