watchDirectory Help > Plugins > Automatically Create HTML
Automatically Create HTML - writing Snippets
The HTML plugin creates HTML based on "snippet" files. These are plain text files you can edit and create using text editors such as notepad. Do not use rich text editors such as Microsoft Word to edit these snippets!
Variables
| Variable name | Description | Can be used in snippet |
|---|---|---|
| $TITLE$ | Replaced by the title you entered on the configure dialog | All snippets |
| $TOTALPICS$ | The total number of thumbnails that are processed | All snippets |
| $CURRENT_DATE$ | Replaced by the current date, formatted according to your system settings | All snippets |
| $CURRENT_TIME$ | Replaced by the current time, formatted according to your system settings | All snippets |
| $OUT_BASENAME$ | Replaced by the filename, without extension, that you entered as Output file name | All snippets |
| $OUT_EXTENSION$ | Replaced by the extension of the filename, that you entered as Output file name | All snippets |
| $BASEURL_FULLSIZE_PICS$ | Replaced by the relative path to the full size pictures (set in HtmlVars.ini) |
All snippets |
| $TOTALPAGES$ | Replaced by the number of index pages that are generated | All snippets |
| $URLTHISINDEX$ | Replaced by the path to the current index page | All snippets |
| $URLPREVINDEX$ | Replaced by the path to the previous index page | All snippets |
| $URLNEXTINDEX$ | Replaced by the path to the next index page | All snippets |
| $PAGENO$ | Replaced by the page number of the current index page | All snippets |
Conditional blocks
The HTML generator supports (limited) conditional blocks inside snippets. These blocks are marked with $$IFxxxx$$ and $$ENDIFxxxx$$ tags.IFPREVINDEX/ENDIFPREVINDEX
Use these tags to mark a block that should only be written when there is a previous index page. The enclosed block will not be written on page 1. These tags can only be used inside the Header and Footer snippets. Sample:$$IFPREVINDEX$$ <a href="$URLPREVINDEX$">Previous page</a> $$ENDIFPREVINDEX$$
IFNEXTINDEX/ENDIFNEXTINDEX
Use these tags to mark a block that should only be written when there is a next index page. The enclosed block will not be written on the last page. These tags can only be used inside the Header and Footer snippets. Sample:$$IFNEXTINDEX$$ <a href="$URLNEXTINDEX$">Next page</a> $$ENDIFNEXTINDEX$$
IFPREVPIC/ENDIFPREVPIC
Use these tags to mark a block that should only be written when there is a previous full size picture. The enclosed block will not be written for the first picture. These tags can only be used inside the FullSize snippets. Sample:$$IFPREVPIC$$ <a href="$URLPREVPIC$">Previous picture</a> $$ENDIFPREVPIC$$
IFNEXTPIC/ENDIFNEXTPIC
Use these tags to mark a block that should only be written when there is a next full size picture. The enclosed block will not be written for the last picture. These tags can only be used inside the FullSize snippets. Sample:$$IFNEXTPIC$$ <a href="$URLNEXTPIC$">Next picture</a> $$ENDIFNEXTPIC$$



