Don't prepend tagbase to tags if they start with "./" or "/".

That syntax made little sense previously, and this allows sites to put
"most" of their tags under $tagbase.
master
Simon McVittie 2008-07-21 22:01:11 +01:00
parent 8fbe201bb3
commit 09a5cdbb34
2 changed files with 8 additions and 1 deletions

View File

@ -25,7 +25,8 @@ sub getopt () { #{{{
sub tagpage ($) { #{{{
my $tag=shift;
if (exists $config{tagbase} &&
if ($tag !~ m{^\.?/} &&
exists $config{tagbase} &&
defined $config{tagbase}) {
$tag=$config{tagbase}."/".$tag;
}

View File

@ -24,6 +24,12 @@ tags/tech, tags/life, and tags/linux. This is a useful way to avoid
having to write the full path to tags, if you want to keep them grouped
together out of the way.
If you want to override the tagbase for a particular tag, you can use
something like this:
\[[!tag ./foo]]
\[[!taglink /foo]]
[[!if test="enabled(tag)" then="""
This wiki has the tag plugin enabled, so you'll see a note below that this
page is tagged with the "tags" tag.