With this change, the <span> with class createlink is always created
around the link text, even when no CGI URL is defined. This allows
styling of these 'links' in this case too. The same class is used as when
CGI URL is defined so that e.g. clones of the same ikiwiki, one with CGI
and one without, display in the same way (modulo the missing question mark
link).
(cherry picked from commit
290d1b498f00f63e6d41218ddb76d87e68ed5081)
$bestlink=htmlpage($bestlink);
if (! $destsources{$bestlink}) {
- return $linktext unless length $config{cgiurl};
- return "<span class=\"createlink\"><a href=\"".
+ my $cgilink = "";
+ if (length $config{cgiurl}) {
+ $cgilink = "<a href=\"".
cgiurl(
do => "create",
page => lc($link),
from => $lpage
- ).
- "\" rel=\"nofollow\">?</a>$linktext</span>"
+ )."\" rel=\"nofollow\">?</a>";
+ }
+ return "<span class=\"createlink\">$cgilink$linktext</span>"
}
}