About Arbortext Styler > Document Preview and Publishing > PTC Arbortext Layout Developer in Arbortext Styler > Associating an PTC ALD Template With a Stylesheet
Associating an PTC ALD Template With a Stylesheet
You can elect to associate either type of PTC ALD template with your Arbortext Styler stylesheet — both those coded with PTC ALD's proprietary macro language and those coded using JavaScript and PTC ALD's FOM object model. In either case the template will have the .3f file extension.
A template must conform to a certain format to correctly support preview or publishing from Arbortext Styler. Refer to Guidelines and Limitations for PTC ALD Template Files to be Associated with a Arbortext Styler Stylesheet for information.
1. Navigate to the Print/PDF tab of the Stylesheet Properties dialog box for your stylesheet, accessed via the File > Stylesheet Properties menu option or when creating a new stylesheet.
2. Select PTC ALD in the Print Engine field to set it as the print/PDF engine for the stylesheet and activate the option to browse for an PTC ALD template.
3. Click the Browse button next to the Optional APP template to associate with stylesheet field.
4. In the PTC ALD Templates file picker dialog box that appears, navigate to and select the required .3f file. The Files of type field is set to look for files with a .3f extension.
Selecting a .3f file in the file chooser dialog box will not open it. It will associate the template with the current stylesheet to extend the stylesheet's capability.
5. Alternatively, you can type the path to a template in the Optional APP template to associate with stylesheet field.
If you enter a full path to a template here, and it cannot be found, no error will be generated.
It is recommended that you  place the .3f file in the same directory as the stylesheet and specify only its file name, with no path.
6. Click OK to accept the selection. The Optional PTC ALD template to associate with stylesheet field contains the full path and filename information for the selected template file, which will be stored in the stylesheet. Once the change to the stylesheet has been saved, this setting will persist for the stylesheet in this and succeeding Arbortext Editor with Styler sessions, until removed or edited.
Guidelines and Limitations for PTC ALD Template Files to be Associated with a Arbortext Styler Stylesheet
When writing an PTC ALD template that will eventually be associated with a .style stylesheet, you must ensure that its contents comply with the points listed below.
Any PTC ALD template file may be associated with the stylesheet. The only restriction is that the file extension is .3f as this is the extension that you can browse for and select via the user interface.
When the stylesheet and template are combined, everything present in the template file will become part of the document created by the publishing process, including any page items, tags or other PTC ALD objects.
If frames are to format the main content stream, their text content must be set to "EditorDom0". This may not be possible through the user interface of PTC Arbortext Layout Developer unless the stream exists in the template, so it is recommended that the frame object itself is edited to include
text "editorDom0",0,0,0,0,0
The stylesheet compilation process creates numerous tags in the PTC ALD document prior to formatting the content. An existing tag in the template with the same name as one that would get created during the compilation process will be used in preference.
Any autoexec script present in the root namespace will not be run.
Some (if not all) document preferences set in the template will persist in the created document unless specifically set by the stylesheet compilation process. This includes frame guides, which will appear in the PTC ALD Preview window if they have been activated.