BetterHTMLExport's template system is now more flexible and extendible. Create and share your own templates for use when you create web albums with iPhoto. To create a template for BetterHTMLExport you need to do the folllowing (explained below in futher detail):
The index template is used to create all of the index pages. It is a web page with template commands included in it. Click the Language link to see a description of the template language. Click the Index Data link to see a description of all of the values that are available to you when creating an index template. You may name your index template whatever you wish.
The image template is used to create all of the image pages. It is a web page with template commands included in it. Click the Language link to see a description of the template language. Click the Image Data link to see a description of all of the values that are available to you when creating an image template. You may name your image template whatever you wish.
Create any extra art you need for your pages
Use your favorite graphics program to create whatever art you will need on your web pages (beyond the images being exported). The built in template only has two pieces of art, a next button and a previous button. You may name your art files whatever you wish.
Create a template description file
In order for BetterHTMLExport to recognize your template you must create a desciption file. Use the PropertyListEditor program (installed with the Mac OS X Developer Tools) to create an XML property list with the following elements:
| Name | Type | Description |
|---|---|---|
| image_template_name | String | This is the file name of the image template you created above |
| index_template_name | String | This is the file name of the index template you created above |
| required_art | Array | This is an array of Strings. Each entry is the file name of one of the pieces of art you created above. Each piece of art listed will be copied to the export directory along with the generated web pages and images whenever you do an export. |
| template_description | String | This is a short description of the template and will be used as a the tool tip for the template selection popup menu when this template is selected |
| template_name | String | This is the name of the template and will be displayed in the template selection popup menu |
| index_extra | Array | This is a list of any extra (Custom Tab) data that is used by the template's index pages. See below for a description of the array contents. |
| image_extra | Array | This is a list of any extra (Custom Tab) data that is used by the template's image pages. See below for a description of the array contents. |
Even if you do not support any extra data, you should define the image_extra and index_extra elements, that way the BetterHTMLExport user interface will tell uses you do not use and custom data as opposed to telling them that it does not know.
If you do use custom data, the index_extra and image_extra arrays should contains Dictionaries with the following elements:
| Name | Type | Description |
|---|---|---|
| name | String | This is the name of the custom data entry. It will be used as the key in the template e.g. [extra.name] and must follow the naming rules for custom data key names. |
| description | String | This is a short description of what the entry is used for. It will be available to users as a tooltip in the custom data user interface. |
| multiple | Boolean | Set this flag to YES if you expect this entry be used multiple times. |
| optional | Boolean | Set this flag to YES if the entry is optional and the user does not have to have it for the template to work. |
You may name the file whatever you want as long as it has the '.plist' extension.
To install your template, take all of the files created in the previous steps (plist, template, and art files) and place them in a folder with the template name. Place that folder in one of the two following directories:
| (users home directory)/Library/BetterHTMLExport/templates/ | Templates placed here with only be available to the specific user |
| /Library/BetterHTMLExport/templates/ | Templates placed here will be available to all users of the computer |
Now you are ready to launch iPhoto and try out your template. If all went well it should be listed in the template popup menu on the advanced settings screen.
BetterHTMLExport is copyright 2005-2006, by Geeks R Us and copyright 2002-2005, by Simeon
Leifer, All Rights Reserved.
For more information visit geeksrus.com