From 7f8efe4524fb8cc2066e07c4f9fbad3b14fbccfb Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 14 Mar 2006 06:04:44 +0000 Subject: fix Discussion links to not take the BestLink. As a bonus we now have meta Disussion/Discussion pages available, etc. Oh well.. :-) --- ikiwiki | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ikiwiki') diff --git a/ikiwiki b/ikiwiki index d6057c101..53a86c1ed 100755 --- a/ikiwiki +++ b/ikiwiki @@ -210,9 +210,15 @@ sub htmllink { #{{{ my $page=shift; my $link=shift; my $noimageinline=shift; # don't turn links into inline html images - my $createsubpage=shift; # force creation of a subpage if page DNE + my $forcesubpage=shift; # force a link to a subpage - my $bestlink=bestlink($page, $link); + my $bestlink; + if (! $forcesubpage) { + $bestlink=bestlink($page, $link); + } + else { + $bestlink="$page/".lc($link); + } return $link if length $bestlink && $page eq $bestlink; @@ -224,12 +230,7 @@ sub htmllink { #{{{ $bestlink=htmlpage($bestlink); } if (! grep { $_ eq $bestlink } values %renderedfiles) { - if (! $createsubpage) { - return "?$link" - } - else { - return "?$link" - } + return "?$link" } $bestlink=File::Spec->abs2rel($bestlink, dirname($page)); -- cgit v1.2.3