Generating a Lithium TOC

From Second Life Wiki
Revision as of 16:53, 19 May 2011 by Rand Linden (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Prerequisite: Download this Perl script: http://duramecho.com/ComputerPrograms/HtmlHeadingsToTableOfContents/index.html

If you don't have Perl installed on your computer (i.e. "if you're on Windows"): You can get ActivePerl here. You can install with the default options. Make sure you restart your computer afterward.

Procedure

  1. Copy / paste the HTML into a local file.
  2. Add <html><body> ....</body></html>
  3. Run script
perl HtmlHeadingsToTableOfContents.pl <YourHtmlFile.html>
4. Copy paste results back into Lithium.
5. Add TOC table wrapper code

TOC wrapper code

<table id="toc" class="toc" summary="Contents">
<tbody>
<tr>
<td>
<!-- Generated TOC here -->
</td>
</tr>
</tbody>
</table>

NOTE: You may want to strip off the <html><body> ....</body></html> tags, though Lithium will probably do that for you.