Crossword Compiler can export interactive or printable web pages containing the grid and clues from the current crossword. To do this it uses a template file that you can modify to change the look of the web page that is produced. For instance, you may wish to change the background color and include a link to your home page. Alternatively, you can use the default template and then, after exporting, copy the applet code to a separate page where you want it. For Web Publish (to crossword.info), or for use with the WordPress plugin, the template has no effect.
HTML templates are stored in your Crossword Compiler Templates folder and must have the .HTML extension. You can edit the file with a text editor like Notepad, or you may be able to use a dedicated HTML editor if you have one.
To generate the web page for a crossword the program replaces various placeholders in the template with the corresponding content for the current crossword. For instance, <CCCLUES> will be replaced by the clues (including Across/Down headers). See the Default template supplied for an example.
The general placeholder syntax is <CCxxxx> where xxxx must be in upper case. You can use the following placeholders:
<CCTITLE> | Puzzle Title (see puzzle information) |
<CCCOPYRIGHT> | Puzzle Copyright |
<CCAUTHOR> | Puzzle Author |
<CCDESCRIPTION> | Puzzle Description |
<CCCLUES> | All the clues |
<CCGRIDCLUECOLUMNS> | A table with the grid and clues in columns |
<CCACROSSCLUES> | Just the Across clues (with the Across header) |
<CCDOWNCLUES> | Just the Down clues (with the Down header) |
<CCJAVAAPP> | Insert JavaScript applet |
<CCPUZZLE> | The puzzle grid, of the form <IMG SRC=....> |
<CCSOLUTION> | The puzzle solution, of the form <IMG SRC=...> |
<CCSOLUTIONURL> | The file name of the solution grid (e.g. "MyPuzzle.png") |
<CCCODEGRID> | Code grid for a coded puzzle |
<CCCODESOLUTION> | Code solution for a coded puzzle |
<CCFILEROOT> | The root name of the HTML file (e.g. "MyPuzzle") |
<CCDAY> | The day |
<CCMONTH> | The month |
<CCYEAR> | The year |
<CCJAVAAPPWIDTH> | Width (max) of the applet |
<CCJAVAAPPHEIGHT> | Height (max) of the applet |
<CCPDFURL> | A link to a PDF file of the puzzle |
There is also the general placeholder
<CCPROMPT This will be the prompt>
You can use any text instead of 'This will be the prompt'. When exporting you will be shown a window asking for the 'This will be the prompt' text. When you enter this it will replace the entire <CCPROMPT xxx> item with whatever text you enter. Use this to add additional custom items to the web page, maybe a grid serial number, extra information, or whatever.
If you are exporting an interactive puzzle you should use <CCJAVAAPP>.
The are also a set of conditional elements. These must occur in pairs, the syntax being of the form
<CCIFxxxx> stuff here </CCIFxxx>
The "stuff here" is only included in the web page if the xxxx is true. You can use the following conditional elements
<CCIFTITLE> | True if the puzzle has a title |
<CCIFAUTHOR> | True if the puzzle has an author |
<CCIFCOPYRIGHT> | True if the puzzle has a copyright |
<CCIFDESCRIPTION> | True if the puzzle has a description |
<CCIFCLUES> | True if clues were selected to be included |
<CCIFJAVA> | True if the template is invoked from interactive export |
<CCIFPDF> | True if PDF link included |
<CCIFPUZZLE> | True if the puzzle was selected to be included |
<CCIFSOLUTION> | True if the solution was selected to be included |
<CCIFCODED> | True if the grid numbering is by letter. |
<CCIFHASACROSSDOWN> | True if clue numbering is Normal or By Position. |
.<CCIFBUTTONS> | True if using Java export with buttons in the applet |
<CCIFGRIDCLUECOLUMNS> | True if include a table of grid and clues |
<CCIFRESPONSIVE> | True if applet layout changes responsively |
You can also use the corresponding <CCIFNOxxx> elements to be included if the negative is true.
You can create several templates if you like. Just put them all in the Crossword Compiler Templates folder and select the template you want to use when you export a web page.