You are not logged in.
Pages: 1
We've integrated Xinha to work with TWiki and would like to be able to offer the same 'Table of Contents' feature as TWiki provides by %TOC% variable. Does anyone know how to do this?
Offline
Found the problem: Just need to make sure the header tags are on separate lines in the HTML. This will fix it:
while ($line = <INPUT>)
{
$line =~ s/%TOC%/\n%TOC%\n/;
$line =~ s/<h1>/\n<h1>/;
$line =~ s/<\/h1>/<\/h1>\n/;
$line =~ s/<h2>/\n<h2>/;
$line =~ s/<\/h2>/<\/h2>\n/;
$line =~ s/<h3>/\n<h3>/;
$line =~ s/<\/h3>/<\/h3>\n/;
$line =~ s/<h4>/\n<h4>/;
$line =~ s/<\/h4>/<\/h4>\n/;
print OUTPUT $line;
}
Last edited by wikiwhacker (2005-10-17 19:36:09)
Offline
Pages: 1