]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/inline.pm
add a link
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index 0fe0bd2e108a444b6b85c2ded93840f10e4fd2fc..942df6f89cf67381b66cea89ada37bba1f419620 100644 (file)
@@ -332,12 +332,13 @@ sub preprocess_inline (@) {
                        error sprintf(gettext("nonexistant template %s"), $params{template});
                }
                my $template=HTML::Template->new(@params) unless $raw;
+               my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content'));
        
                foreach my $page (@list) {
                        my $file = $pagesources{$page};
                        my $type = pagetype($file);
                        if (! $raw || ($raw && ! defined $type)) {
-                               unless ($archive && $quick) {
+                               if ($needcontent) {
                                        # Get the content before populating the
                                        # template, since getting the content uses
                                        # the same template if inlines are nested.