my $destpage=$params{destpage};
my $template=$params{template};
- $template->param(tags => join(', ',
- map { IkiWiki::htmllink($page, $destpage, $_) }
- @{$tags{$page}}))
- if exists $tags{$page} && $template->query(name => "tags");
+ $template->param(tags => [
+ map { link => IkiWiki::htmllink($page, $destpage, $_) },
+ @{$tags{$page}}
+ ]) if exists $tags{$page} && @{$tags{$page}} && $template->query(name => "tags");
} # }}}
1
--wikiname="ikiwiki" --verbose --no-rcs \
--exclude=/discussion --no-discussion \
--plugin=brokenlinks --plugin=pagecount \
- --plugin=orphans --plugin=haiku --plugin=meta
+ --plugin=orphans --plugin=haiku --plugin=meta \
+ --plugin=tag
./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
margin: 1em 0;
}
-#pageinfo {
+.pageinfo {
font-style: italic;
}
value.
- Fixes preprocessor directive parameter parsing so that
foo=bar baz now means "foo=bar" and a "baz" with no value.
- * Run pagetemplate hooks when inlining pages so that inlines pages also
+ * Run pagetemplate hooks when inlining pages so that inlined pages also
list their tags.
* Make all plugins with pagetemplate hooks check that variables exist
- on the template before setting them.
+ on the template before setting them, for robustness.
* Switch pagetemplate hooks to using named parameters.
* Pass a "destpage" parameter to preprocessor and pagetemplate hooks.
This will be the page that a source page will be part of, which is
for each tag, so you can use a [[GlobList]] to link to all pages that are
tagged with a given tag, for example.
-This plugin is included in ikiwiki, but is not enabled by default.
+This plugin is included in ikiwiki, but is not enabled by default. If it is
+enabled, you'll see a note below that this page is tagged with the "tags"
+tag.
+
+[[tag tags]]
<TMPL_VAR CONTENT>
-<p>
-<i>
+<span class="pageinfo">
Posted <TMPL_VAR CTIME>
-<TMPL_IF NAME="TAGS">Tags: <TMPL_VAR TAGS></TMPL_IF>
-</i>
-</p>
+</span>
+
+<span class="tags">
+<TMPL_IF NAME="TAGS">
+Tags:
+<TMPL_LOOP NAME="TAGS">
+<TMPL_VAR NAME=LINK>
+</TMPL_LOOP>
+</TMPL_IF>
+</span>
</div>
<TMPL_VAR PAGELINK><br />
<i>
Posted <TMPL_VAR CTIME>
-<!-- <TMPL_IF NAME="TAGS"><TMPL_VAR TAGS></TMPL_IF> -->
</i>
</p>
<TMPL_VAR CONTENT>
</div>
+<div class="tags">
+<TMPL_IF NAME="TAGS">
+Tags:
+<TMPL_LOOP NAME="TAGS">
+<TMPL_VAR NAME=LINK>
+</TMPL_LOOP>
+</TMPL_IF>
+</div>
+
<div id="backlinks">
<TMPL_IF NAME="BACKLINKS">
Links:
</div>
<div id="footer">
-<span id="pageinfo">
+<span class="pageinfo">
<!-- from <TMPL_VAR NAME=WIKINAME> -->
Last edited <TMPL_VAR NAME=MTIME>
-<TMPL_IF NAME="TAGS">Tags: <TMPL_VAR TAGS></TMPL_IF>
</span>
</div>