Difference between revisions of "Generating a Lithium TOC"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
'''Prerequisite''': Download this Perl script: http://duramecho.com/ComputerPrograms/HtmlHeadingsToTableOfContents/index.html
{{#Widget:Redirect|/t5/English-Knowledge-Base/Knowledge-Base-Style-Guide/ta-p/717705#Section_.3.2a}}
 
'''If you don't have Perl installed on your computer (i.e. "if you're on Windows"):''' You can get ActivePerl [http://www.activestate.com/activeperl/downloads here].  You can install with the default options. Make sure you restart your computer afterward.
 
'''Procedure'''
 
# Copy / paste the HTML into a local file.
#Add <html><body> ....</body></html>
#Run script
:<pre>perl HtmlHeadingsToTableOfContents.pl <YourHtmlFile.html></pre>
:4. Copy paste results back into Lithium.
:5. Add TOC table wrapper code
 
'''TOC wrapper code'''
<pre>
<table id="toc" class="toc" summary="Contents">
<tbody>
<tr>
<td>
<!-- Generated TOC here -->
</td>
</tr>
</tbody>
</table>
</pre>
 
NOTE: You may want to strip off the <html><body> ....</body></html> tags, though Lithium will probably do that for you.
 
[[Category:Knowledge Base]]

Revision as of 13:59, 13 January 2012

Redirecting to http://community.secondlife.com