In Reply To:
Thanks Phoenix and Bobsie!
I got it to work now :-)
For the record:
Each if needs to be closed, so the code is like this:
Quote:
<%if isNew%>
This is new!
<%endif%>
<%ifnot isNew%>
This is not new!
<%endif%>
Otherwise it breaks the HTML.
One day I'll try and write this into the FAQ.
John
[This message has been edited by gotze (edited July 05, 1999).]
I am still having problems with this... could you help please?
SITE_HTML_TEMPLATES.PL
...
sub site_html_detailed {
# --------------------------------------------------------
# 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 $temp = $rec{Category};$temp =~ s/_/ /;($rec{Country}, $rec{State}, $rec{City}) = split /\//, $temp;
#### IFNOT MOD START
if (! $rec{'Graphic'} eq '1') {
delete $rec{'Graphic'};
}
#### IFNOT MOD END
return &load_template ('detailed.html', {
total => $total,
grand_total => $grand_total,
title_linked => $title_linked,
%rec,
%globals
} );
}
...
DETAILED.HTML
...
<%if Graphic%>
<img src="<%Graphic%>">
<%endif%>
<%ifnot Graphic%>
No Photo
<%endif%>
...
Thanks,
Will