next up previous contents index
Next: Index Up: Templates Previous: Templates Structure   Contents   Index


Example

Have look at the following HTML source code:
<html>
<head>
</head>
<body>
Hello World
</body>
</html>

All it does is to print out the text "Hello World". Now we want to modifiy this source code to create a very basic template.

First save this file to a location you wish and call it "index.html". Next we want to insert a clear page title, so insert the following line between <head> and </html>

<title>$HEADTITLE</title>

The export module will replace the $HEADTITLE token with the building name. Next we insert a two column table, where we want the information and the images to be placed. Insert between <body> and </body> the following (first you can remove the "Hello World" text):

<table border="1">
<tr>
<td>Interpolation info</td>
<td>$CONTENT</td>
</tr>
</table>

The $CONTENT token will be replaced by the interpolation information. Now comes the tricky part. Because the export module does not know how many floors you have in your building, we need to define the following table rows in a separate file, which the export module takes for each floor and insert the desired information. So create a plain text file called "floor_menu.txt" and save it right with the "index.html" file. Put the follwing lines into this new file:
<tr>
<td>$FLOORNAME</td>
<td><img src="$FLOORIMAGE"></td>
</tr>

This line means, that the floor name is printed into the left column and the image into the right. Now we need to modify the "index.html", telling the export module to place the above line in the table. Insert $FLOORMENU right before the </table> statement.

That's it. Your export should now look something like 5.2. If not look whether you have choosen the right templates in the preferences dialog.

Figure 5.2: Export with example template
\includegraphics[height=4.1in, width=4.7in]{template_export.ps}

To learn more about creating your own templates you can take a closer look into the given templates, which are installed along with the program.


next up previous contents index
Next: Index Up: Templates Previous: Templates Structure   Contents   Index
SWT-Gruppe 2003-07-08