if (! exists $params{show} && $params{archive} eq "no") {
$params{show}=10;
}
+ if (! exists $params{rss}) {
+ $params{rss}="yes";
+ }
# Avoid nested inlines, to avoid loops etc.
if ($processing_inline) {
my @list;
foreach my $page (keys %pagesources) {
next if $page eq $params{page};
- if (globlist_match($page, $params{pages})) {
+ if (pagespec_match($page, $params{pages})) {
push @list, $page;
}
}
}
$ret.=$formtemplate->output;
}
- elsif ($config{rss}) {
+ elsif ($config{rss} && $params{rss} eq "yes") {
# Add a rss link button.
my $linktemplate=template("rsslink.tmpl", blind_cache => 1);
$linktemplate->param(rssurl => rsspage(basename($params{page})));
# TODO: should really add this to renderedfiles and call
# check_overwrite, but currently renderedfiles
# only supports listing one file per page.
- if ($config{rss}) {
+ if ($config{rss} && $params{rss} eq "yes") {
writefile(rsspage($params{page}), $config{destdir},
genrss($params{page}, @list));
$toping{$params{page}}=1 unless $config{rebuild};
$itemtemplate->param(
title => pagetitle(basename($p)),
url => "$config{url}/$renderedfiles{$p}",
+ permalink => "$config{url}/$renderedfiles{$p}",
pubdate => date_822($pagectime{$p}),
content => absolute_urls(get_inline_content($p, $page), $url),
);
shift->(page => $p, destpage => $page,
template => $itemtemplate);
});
+
$content.=$itemtemplate->output;
$itemtemplate->clear_params;
}
pageurl => $url,
content => $content,
);
-
run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
template => $template);