Hi,
If called via SSI, you need to print the content type headers, and print the code.
If called as a <%tag%>, you need to return the output, not print it.
What I would do is:
sub top10ssi {
print $IN->header;
print _generate_top10();
}
sub top10 {
return _generate_top10();
}
sub _generate_top10 {
# figure out top10
return $top10;
}Does that make sense? Let me know if it doesn't work for you..
Cheers,
Alex
--
Gossamer Threads Inc.
If called via SSI, you need to print the content type headers, and print the code.
If called as a <%tag%>, you need to return the output, not print it.
What I would do is:
Code:
use Links qw/$IN/; sub top10ssi {
print $IN->header;
print _generate_top10();
}
sub top10 {
return _generate_top10();
}
sub _generate_top10 {
# figure out top10
return $top10;
}
Cheers,
Alex
--
Gossamer Threads Inc.