Reusable Content in Templates
Include templates are used to define reusable pieces of code (for example, standard headers, copyright statements, and so on) to be inserted in other templates by means of the
#parse directive has the following syntax:
#parse("Objective-C File Header.m").
Templates that can be referenced in this way in other templates are listed on the Includes tab of the File and Code Templates settings page.
To create an include template:
- In the Settings/Preferences dialog (⌘,), click File and Code Templates under Editor.
- On the File and Code Templates page , open the Includes tab.
- Click the Create Template button () on the toolbar and specify the include template name, extension, and body.
To insert a reusable template into another template:
- Add the
#parsedirective with the name of the include template that you want to insert. For an example, see template syntax.