]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
remove forum from docwiki
[ikiwiki.git] / doc / todo / toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
1 It would be nice if the [[plugins/toc]] plugin let you specify a header level "ceiling" above which (or above and including which) the headers would not be incorporated into the toc.
2
3 Currently, the levels=X parameter lets you tweak how deep it will go for small headers, but I'd like to chop off the h1's (as I use them for my page title) -- [[Jon]]
4
5 > This change to toc.pm should do it. --[[KathrynAndersen]]
6
7         56,57c56,57
8         <       my $curlevel;
9         <       my $startlevel=0;
10         ---
11         >       my $startlevel=($params{startlevel} ? $params{startlevel} : 0);
12         >       my $curlevel=$startlevel-1;
13         69a70
14         >                       # unless we're given startlevel as a parameter
15         73a75,79
16         >                       elsif (defined $params{startlevel}
17         >                              and $level < $params{startlevel})
18         >                       {
19         >                           return;
20         >                       }
21