Page Template Preview Utility
Page Template Preview Project.zip
This page includes a page template preview utility that I wrote (and unsuccessfully demo'd at RoundUp 08) to help clarify the activity of page templates. To make this utility go:
NOTE This utility uses the Python scripting language to run a small http server on your local system. As such, you need Python to run the utility. You can download Python from the official website: http://www.python.org/download/.
- Download the attached zip file.
Extract the contents someplace that you can get at them (your Desktop, for instance).
Open up Page Template Preview Project and double-click server.py within it.
NOTE You may get a message from your firewall asking you if you want to unblock port 8000. Unblock as you are able and willing.
Fire up a browser to http://localhost:8000/
Things to Look At
The server divides the world into two parts which I have termed learning and preview. You can modify the included ePublisher project and see the changes reflected in the preview portion. The learning section shows the page template in its raw state and allows you to toggle conditions on and off to gain an understanding of how they work. You can also click on parts of the rendered page template to see the various elements a given part of the page contains. This show up in the Properties frame.
Disclaimer
This utility is offered as is. As folks who saw my presentation on Page Templates will attest, it's a little unstable and is not intended for any purpose other than an alternative presentation of how page templates work. I encourage and welcome any suggestions you may have and or any bugs you may find. It is likely that no time will be scheduled for me to actually fix problems, but I love tinkering in Python, Javascript, and ePublisher, so I will probably get around to posting bug fixes sooner or later, when they come to light. Also, I would welcome patches, if anyone feels inclined to hack.
Also, it may be that this utility does not work so well in all browsers. I used Firefox 3 exclusively when developing it.
Enjoy.