# Manage templates

The PatientAccess CMS provides a default template that you can view and export. You can choose to use the default template, or you can copy the default template as a source and modify it. Even though the supplied default template functions correctly, we cannot safely update custom templates. Thus, when the default template is updated, you'll need to manually update changes in your customized template.

Create a customized template

The ExanDefault template cannot be adapted or customized directly. If you want to customize this default template, you'll need to copy the template first.

Alternatively, you can create a new template, in which you enter your own code. For instructions on creating a new template, see Create a new template.

Note: You should manually update any customized templates when the ExanDefault template is updated.

To create a customized template:

1. On the Templates tab, select the ExanDefault template.
2. Click the Copy button.

The PatientAccess CMS displays the message: Are you sure?

1. Click the OK button to copy the template.

A copy of the ExanDefault template is displayed. You can now begin adapting the template.

1. In the Template Title box, enter a title. For example, we'll enter Dental Institution.

1. Click the Edit button next to one of the code types.

For example, we'll enter two custom fields (to enter an email address and a contact number).

> 1. Click the Edit button next to the HTML code.
> 2. On the page, click to the right of the <!--Left Content Replacement Area--> placeholder.
> 3. From the Replacement Area drop-down list, select Custom1, and click the Insert button.

> The Custom1 placeholder is inserted into the template.

1. After you've made your edits, click the Save button to save the new template.
2. Click the Close button.

Now you'll attach a page to your new template. For this example, we'll select “New Page Example” that we'll attach to our example Dental Institution template.

1. Click the Pages tab, and select a page. For example, we'll select New Page Example.

1. From the Meta Information area, select the customized template. For example, we'll select the Dental Institution template.

For our example, we'll enter some text in the Custom1 and Custom2 fields. To do this:

> - Click the Edit button next to the Custom1 field, and using the WYSIWYG editor, enter Email: dentalschool@uni.edu.

> - Click the Edit button next to the Custom2 field, and enter Dental School Phone: 770-500-5000.

1. Click the Save button.
2. Click the Preview button to preview the changes in the (Undefined variable: General.Product2 Admin CMS).

Create a new template

When you create a new template, the template has no code. You'll input your own HTML, Logic CSS, CSS, and JavaScript.

For instructions on copying the default template, see Create a customized template.

Note: You should manually update any customized templates when the ExanDefault template is updated.

To create a new template:

1. On the Templates tab, click the New button to display the New Template page.

1. In the Template Title box, enter a title.
2. Click the Edit b in each of the code fields to enter your own code.

> Tip: To help you build your template, you can select from a list of placeholders in the Replacement Area drop-down. There is also a place holder for the logged-in user, in the Replacement String drop-down. The system will replace these placeholders with the appropriate content when the page is rendered.

1. Click the Save button when you've finished entering your code.
2. Click the Close button to close the WYSIWYG editor.

Delete a customized template

To delete a customized template:

1. On the Templates tab, select a template.
2. Click the Delete button, twice.

Export a template

This feature is included if you want to back up an existing template before making changes, or edit a template using an external text editor such as Notepad.

To export a template:

1. On the Templates tab, select a template. For example, we'll select the Dental Institution template.
2. Click the Export button next to one of the code types. For example, we'll select the Edit button next to the HTML code. In this example, the Dental_Institution.html is displayed in the lower-left corner of the page.

1. Open with Notepad (or an HTML editor of your choice), and click OK.
2. Drag the exported HTML code, and drop the code onto the opened Notepad area.

Now you can edit and save the changes.

1. When you've finished editing the HTML, choose File, and then Save to save the new code.
2. Click Close.

Insert/replace placeholder text in a customized template

The PatientAccess CMS lets you use placeholder text (Custom1 to Custom5 fields) in customized templates that you can personalize in your pages. First you insert placeholder text in the HTML code, and then you replace the placeholder text with your own text.

To insert placeholder text in a customized template:

1. In the Templates tab, select a customized template.
2. In the Code area, click the Edit button next to the HTML code.

The Edit page appears.

1. Click inside one of the divs in the HTML. For example, we'll click inside <div id-”mainColumn”> after <!--Main Content Replacement Area-->.
2. From the Replacement Area drop-down list, select Custom1.
3. Click the Insert button.

In this example, we've entered the placeholder text (Custom 1) beneath the main content area.

1. Click the Save button.
2. Click the Close button.
3. On the Pages tab, select a page where you want to replace the placeholder text with your own text. For example, we'll select the New Page Example.
4. Click the Edit button to the right of the Custom1 box to display the Content Editor page.
5. Enter your text/images, as desired. For example, we'll enter a horizontal line, an image (using Insert/edit image) and some centered text, using the Address style.

1. Click the Save button when you've finished entering text and/or images.
2. Click the Close button.
3. Click the Preview button to preview the page in PatientAccess. The example below shows the new contact details for the fictional dental institution.

Preview a template

You can preview a template to view the styles and general structure of the pages to which a given template is attached.

To preview a template:

1. On the Templates tab, click a template; for example, the ExanDefault template.
2. Click the Preview button.

The page shows the hierarchy of headings (Header 1, Header 2, and Header 3), as well as the positioning of page elements on the page such as navigation and buttons.

1. Click Close.

View the default template

You can view any of the types of code in the template, such as the HTML, CSS, Logic CSS, or JavaScript.

To view the default template:

1. On the Templates tab, click the ExanDefault template.
2. In the Code area, click View next to a code type. For example, we'll click HTML View.

> Note: This code cannot be edited. If you want to edit the code, you should copy the template. For instructions on copying the default template, see Create a customized template.

1. Click the Close button to exit the page.