aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/toggle.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/toggle.pm')
-rw-r--r--IkiWiki/Plugin/toggle.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index 3f9c48672..df5a2a737 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -80,7 +80,13 @@ sub preprocess_toggle (@) { #{{{
my %params=(id => "default", text => "more", @_);
my $id=genid($params{page}, $params{id});
- return "<a class=\"toggle\" href=\"#$id\">$params{text}</a>";
+ if (! $params{preview}) {
+ return "<a class=\"toggle\" href=\"#$id\">$params{text}</a>";
+ }
+ else {
+ return "$params{text} ".
+ gettext("(not toggleable in preview mode)");
+ }
} # }}}
sub preprocess_toggleable (@) { #{{{