Designing Web Templates

Web templates allow you to use an external HTML document as a basis for designing the web pages for your dialog. After an HTML document has been set up as a template, it is available to be used with all Online Marketing dialogs in the same SetID.

Web templates can reside outside Online Marketing and are referenced by their URLs on the web server.

This chapter describes the process for creating and using web templates with your Online Marketing documents. It includes the following sections:

Click to jump to parent topicCreating Web Template Documents

You can use any HTML document as an Online Marketing web template.

The following XML tags embedded within <SCRIPT> tags make it available to use with Online Marketing.

Note. When using HTML documents containing <FORM> tags, the <FORM> tags cannot span the Online Marketing content. If you use <FORM> tags, make sure to close them (with </FORM>) before the start of the Online Marketing tags.

Add this tag to the <BODY> section of the document:

<script language="XML" xmlns:psfttag=’http://www.peoplesoft.com’> <psfttag:body/> </script>

Note. If your web template includes tables, be sure to place the XML tag within the tags of the empty cell where the Online Marketing form is to be included.

Adding the following tag to the <HEAD> section of the document is required if you specify a title or a redirect URL for the web page. If you do not specify a title or redirect URL the tag is optional but recommended:

<script language="XML" xmlns:psfttag=’http://www.peoplesoft.com’> <psfttag:head/> </script>

The tags define where the document content is to be inserted when the web document is rendered. Online Marketing renders the <TITLE>, <META>, and other header tags in the position specified by the psfttag:head tag and the rest of the document content in the position specified by the psfttag:body tag.

Note. Do not include any other scripting information in the <SCRIPT> tags, because the entire tag and its contents will be replaced by data from an Online Marketing document.

You can embed the following merge content objects in web templates by typing the merge content syntax (beginning with “pstag:vcType”) into the appropriate location in the template:

Note. Web links embedded within web templates will not be recognized by the Dialog Designer or the Document Designer, but they will be handled properly when your dialog is running.

Web templates should be limited to a maximum size of 1 MB and should be saved in UTF-8 encoding format.

See Merge Content Specification.

Click to jump to parent topicSetting Up Web Templates

Before you can use an HTML document as a web template, you must perform a few setup tasks.

Click to jump to top of pageClick to jump to parent topicPage Used in Setting Up Web Templates

Page Name

Definition Name

Navigation

Usage

Template Setup

RY_TEMPLATE

Set Up CRM, Product Related, Online Marketing, Template Setup

Use to make an HTML document available for use as an Online Marketing web template.

Click to jump to top of pageClick to jump to parent topicSetting Up a Web Template

Access the Template Setup page (Set Up CRM, Product Related, Online Marketing, Template Setup).

SetID

The SetID under which the template will reside. If you want the template to exist under multiple SetIDs, you will need to perform Template Setup for each desired SetID.

Template ID

A unique, read-only identifier for the template.

Name

Enter a unique descriptive name for the web template.

URL

Enter the web URL where the template document is stored.

Preview

Click to view the actual appearance of the template document in your browser.

Online Marketing verifies that the URL you supplied is valid and that the XML tags in the template are correct. If the verification is successful, the new template appears in the list of templates. If it is not, an error message is displayed describing the problem. You should go back and recheck your document to make sure you have included the tags properly, or ask your web server administrator to confirm that you are using the correct URL.

Before making your web template available, preview and test it thoroughly in both Microsoft Internet Explorer and Netscape browsers to ensure that all links and any special functionality (such as mouseovers) work properly and that the file looks the same on your browser and in Online Marketing.

Click to jump to parent topicUsing Web Templates

After a web template has been defined, you can use it in any of your Online Marketing web documents.

Note. A web template is associated with a particular SetID. If you want to use the web template with multiple SetIDs, you must create it in each one. Web templates belonging to different SetIDs are updated independently.

Click to jump to top of pageClick to jump to parent topicPermissions for Web Templates

To use web templates, you must have the View web page templates permission, and to use template documents in dialogs you must have the Edit online dialogs permission. To edit web templates, you must have the Edit web page templates permission.

See Setting Up Security and User Preferences.

Click to jump to top of pageClick to jump to parent topicUnderstanding Previewing and Live Rendering of Web Template Documents

You should be aware of the following behavior associated with Online Marketing documents using templates.

If you modify a template but do not change its location (that is, the URL remains the same), the Document Preview function will display the modified template. This is because the document preview does not rely on what is cached on the server.

In a Live dialog, however, documents using web templates are cached. If a template HTML file is changed outside Online Marketing, the new version will not be used until the Online Marketing Dialog Server cache is cleared. You can clear the server cache by saving the template from the client, or by manually clearing the cache using the Online Marketing Control Center.

If you want a modified template to be active immediately, you must clear the server cache as soon as the template is modified. However, if you do not want the modified template to be active immediately, you should be aware that if the server cache is cleared for any reason (even by another Online Marketing user), this will activate the modified template.

To avoid inadvertently activating a template you do not want to use yet, give the template a new name that is not being used by any other dialog documents and test your document using that template. When you are sure the template works properly with the document, save the template under the original name, associate the document with it, and clear the server cache to make it active.

See Also

Using the Control Center

Click to jump to top of pageClick to jump to parent topicUsing Web Templates with Documents

To use a web template with an Online Marketing document:

  1. Before associating an HTML document with a web template, ensure that all references in the web template file (including GIFs, links, JavaScript and Java applets) are absolute references. They should be in the form http://www.domain.com/myimage.gif rather than the form ../images/myimage.gif. Also, make sure that all links and GIFs can be rendered by the Online Marketing web server.

  2. In the Document Designer, create a new document, filling in the appropriate information. In the Template Name field, choose a template from the list of available templates.

  3. Click Preview to verify that your HTML document is displaying properly in the web template.

If the template is not found at rendering time or if it does not contain the appropriate Online Marketing tags, the server treats the document as if no template exists and includes appropriate HTML tags around the head and body sections (just as it does with any other Online Marketing web document).

See Also

Designing Web Documents

Click to jump to top of pageClick to jump to parent topicChanging a Document to use a Web Template

To change an existing dialog document to use a web template:

  1. In the Document Designer, open an existing document.

  2. On the Document page, select a web template from the list in the Template Name field.

  3. Save the document.

The selected template is associated with the document.

See Also

Designing Web Documents

Click to jump to top of pageClick to jump to parent topicChanging a Web Template

If you change the web template, the documents associated with it will automatically apply the changes. However, documents that are imported with previously exported contents with formatting will not be affected by subsequent template changes. Any changes you make after adding a web template to your document will affect the associated documents.