Customizing the List of Links
The :Nav.LinksToAll.Custom: placeholder lets you build highly customized tables of contents links for your presentations.
When PPT2HTML sees this new placeholder, it looks in the PPTools.INI file for special values that it uses when building the table of links to all slides in the presentation.
It builds the table of contents (TOC) by stringing together values in this order:
- CustomTOCBeforeAllSlides at the beginning of the TOC section
- CustomTOCBeforeEachSlide before adding the specific code for each slide
- For each slide, it adds either CustomTOCSlideTemplate for all slides that aren't the current slide or CustomTOCCurrentSlideTemplate if the current slide is the one it's processing
- CustomTOCAfterEachSlide after adding the code for each slide
- CustomTOCAfterAllSlides after it's added code for all slides
You can copy and paste the following text into the [PPT2HML] section of PPTools.INI to get started, then add the values you want to use:
; Custom TOC Settings === CustomTOCBeforeAllSlides= CustomTOCBeforeEachSlide= CustomTOCSlideTemplate= CustomTOCCurrentSlideTemplate= CustomTOCAfterEachSlide= CustomTOCAfterAllSlides= ; END Custom TOC Settings ===
As PPT2HTML builds the TOC, it performs several optional substitutions on special %codes that it finds in the CustomTOC values in your PPTools.INI file.
Filename substitutions all begin with a letter: %s for source PowerPoint file %i for name of image (PNG, GIF, JPG) file creates from each slide %h for name of HTML file PPT2HTML creates from each slide %t for name of your HTML template file To the file code, add: drive to get the file's drive letter; e.g. %hdrive dir to get the file's directory; e.g. %idir name to get the file's file name with no extension; e.g. %tname ext to get the file's extension; e.g. %hext fullname to get the full file name w/o having to reconstruct it from the bits above; e.g. %tfullname Examples: The source PowerPoint filename.extension %sfile%sext = file.ppt The full name of the html file that PPT2HTML is creating from the current slide %hfullname = c:\outputfolder\file0001.htm Here are a few more useful substitutions you can use: %basename for the base name you typed in the Preferences dialog %outputfolder for the path to the folder your HTML files are saved to %pptoolsfolder for the path to the PPTools folder on your computer %iheight for the height of the image PPT2HTML makes from your slides %iwidth for the width of the image %num the number of the current slide %stitle the slide title or slide number if slide has no title %quot quote mark %crlf CR+LF pair %cr CR only %lf LF only
Here's an example that may help understand this better. Use this as your template:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <TITLE>:Prefs.PageTitle:</TITLE> </head> <body> <table> <tr> <td valign="top"> :Nav.LinksToAll.Custom: </td> <td valign="top"> :Nav.Map: <img src=":Slide.Image:" width=":Slide.Image.Width:" border="NO"> </td> </tr> </table> </body> </html>
And add this to your PPTools.INI file in the [PPT2HTML] section:
; This just adds a comment and a horizontal rule at the top of the link list: CustomTOCBeforeAllSlides=<!--BeforeAllSlides-->%crlf<hr />%crlf ; ; We don't need anything special before each slide, so comment the next line out ;CustomTOCBeforeEachSlide= ; ; Links to other slides should look like this: ; <a href="basename+slidenumber.htm">Slide Title</a><br /> CustomTOCSlideTemplate=<a href=%quot%basename%num%hext%quot>%stitle</a><br /> ; ; We don't want a link to the current slide but display its title so we can tell where it is in the list ; make it bold so it's obvious too ... CustomTOCCurrentSlideTemplate=<b>%stitle</b><br /> ; Nothing needed after each slide ;CustomTOCAfterEachSlide= ; and a comment and line break after all's done CustomTOCAfterAllSlides=<!--AfterAllSlides-->%crlf
And here's a much more complex example to give you an idea of the kind of things you can use this feature for. This creates an html form with Option box listing the slides in the presentation. This goes in your templat:
<form name="form1" method="post" action=""> <select name="select" size="1"> <option selected>jump to:</option> :Nav.LinksToAll.Custom: </select> </form>
And use these settings in PPT2HTML:
[PPT2HTML] ; CUSTOM TOC SETTINGS CustomTOCBeforeAllSlides=<!--BeforeAllSlides-->%crlf CustomTOCBeforeEachSlide=<option value=%quot CustomTOCSlideTemplate=%basename%num%hext%quot>%num ;CustomTOCCurrentSlideTemplate=%num%quot CustomTOCCurrentSlideTemplate=%basename%num%hext%quot>%num CustomTOCAfterEachSlide=</option>%crlf CustomTOCAfterAllSlides=<!--AfterAllSlides-->%crlf ; END OF CUSTOM TOC SETTINGS
This is an example of the HTML that PPT2HTML creates when it processes a 6-slide presentation:
<form name="form1" method="post" action=""> <select name="select" size="1"> <option selected>jump to:</option> <!--BeforeAllSlides--> <option value="tntest1.HTM">1</option> <option value="tntest2.HTM">2</option> <option value="tntest3.HTM">3</option> <option value="tntest4.HTM">4</option> <option value="tntest5.HTM">5</option> <option value="tntest6.HTM">6</option> <!--AfterAllSlides--> </select> </form>[Previous] [Home] [Next]