# Administrator Guide

# Creating Data Entry Templates

Data Entry Templates consist of properties that define the fields available for creating a content item. When you create or edit a content item from a Data Entry Template, these properties appear in the Content Item Editor as editable fields, such as text boxes, selection lists, fields for downloading files, boolean True/False radio buttons, and so forth. When you publish the content item, Publisher uses an associated Presentation Template to define how the property values are displayed to the end user.

Users in the Producer role and above can create and configure Data Entry Templates.

This chapter provides an overview of Data Entry Templates and discusses how to create and edit Data Entry Templates.

## About Data Entry Templates

This section provides an overview and includes the following topics:

- Property Types Available for Data Entry Templates
- Delivered Data Entry Templates

### Overview

The pages composing a Web site typically fall into just a few categories. Even a large e-commerce site, with hundreds of Web pages, typically groups them into a home page and a small number of categories, such as catalog listings, weekly specials, news releases, job postings, and so forth. Web pages within each category have identical design and similar content. One job posting, for example, looks like another job posting and contains similar kinds of information.

You can create a Data Entry Template for each category of Web page: for example, a Data Entry Template for catalog listings, another for job postings, and so on. In each Data Entry Template, you specify the kinds of information that will appear on all Web pages in that category; later, contributors use these Data Entry Templates to create content items and enter content for Web pages.

To create Data Entry Templates, you assemble properties—one property for each variable component of a Web page. In a Data Entry Template for job postings, for example, you might include properties for job title, hiring manager, responsibilities, qualifications, salary range, and start date.

When you create a property, you assign a property type to specify the kind of information the property should hold: text, long text, integer, date, item (a reference to another content item), image, file, list, selection list, real, and Boolean.

A Data Entry Template for job postings, for example, might include these properties and types:

Table 9-1 Example: Data Entry Template Properties and Types (Job Posting)
Property Name | Property Type
--- | ---
Job Title | Text
Responsibilities | Long Text
Qualifications | Long Text
Hiring Manager | Selection List
Salary Range | Selection List or Text
Start Date | Date

### Property Types Available for Data Entry Templates

The following property types are available for creating Data Entry Template properties:

- Text
- Long Text
- Integer
- Date
- Item
- List
- Image
- File
- Selection List
- Real
- Boolean

This section describes each property type and its uses.

#### Text

Enables users to enter plain text. You can limit the entry length to anything below 255 plain-text characters.

The example below also displays the red asterisk associated with a required field. Data Entry Template Editor enables you to configure any property as a required one.

Figure 9-1 Text property type field as it appears in Content Item Editor

#### Long Text

Provides a Rich Text Editor that enables users to enter formatted text, images, tables, numbered or bulleted lists, hyperlinks, HTML, and portal transformer tags. You can also specify that the text box allow plain text entry only. You can limit the entry length if you use the plain text option.

Figure 9-2 Long Text property type field as it appears in Content Item Editor

Note: | In Netscape browsers, this field appears as a simple long text field, into which users can enter text and HTML formatting tags.

#### Integer

Enables users to enter a whole number (integer). If a user enters text, an "invalid entry" error occurs. You might want to add instructions to help users understand that they must enter a whole number.

Figure 9-3 Integer property type field as it appears in Content Item Editor

#### Real

Enables users to enter a whole number or fraction in decimal form. If a user enters text, an "invalid entry" error occurs. You might want to add instructions to help users understand that they must enter a number.

Figure 9-4 Real property type field as it appears in Content Item Editor

#### Boolean

Enables users to answer a yes/no or true/false question.

Figure 9-5 Boolean property type field as it appears in Content Item Editor

#### Date

Enables users to enter a date or select it from a pop-up calendar control and choose a time from a drop-down list.

Figure 9-6 Date property type field as it appears in Content Item Editor

#### Item

Enables users to create a new content item or select an existing content item that will appear within the content item created from the Data Entry Template. The Item property is a reference to any content item in the Publisher. The Presentation Template can use this property to access the properties of the referenced item, create a link to the referenced item, or insert the referenced item's published contents into the body of the item being published.

Users can open the content item in a new Content Item Editor window by clicking on it or view the item's content in the lines immediately below the item name by clicking the + next to the item.

Figure 9-7 Item property type field as it appears in Content Item Editor

#### List

Enables users to add multiple content items to the content item created from the Data Entry Template. The published content item displays the items in the list in the same order in which you list them in the Content Item Editor; the up and down arrows on the right allow you to rearrange the order of the list. If you create a new item using the Create Item button in the toolbar, you are prompted to select a Data Entry Template first; if you create a new item using the Create Item icon to the right of an item already in the list, the item uses the same Data Entry Template as the listed item.

Figure 9-8 List property type field as it appears in Content Item Editor

#### Image

Enables users to upload an image from a local or shared network drive.

Figure 9-9 Image property type field as it appears in Content Item Editor

#### File

Enables users to upload a file from a local or shared network drive.

Figure 9-10 File property type field as it appears in Content Item Editor

#### Selection List

Selection lists limit fields to specific entries. You define the list of static entries from which users can choose. A selection list ensures uniformity and eliminates the chance of misspellings. By ensuring uniform data in a contributor's input, a Presentation Template writer can confidently use the value of a property to include content conditionally while publishing.

A selection list must exist before you can add it to a Data Entry Template. You create selection lists using the Selection List page. Selection lists may be shared between Data Entry Templates. In the Data Entry Template Editor, you can specify whether users can select more than one item.

Figure 9-11 Selection List property type field as it appears in Content Item Editor

Figure 9-12 Selection List property type field allowing multiple selections

##### Defining Selection Lists

To define a selection list:

1. Open Publisher Explorer and navigate to the folder in which you want to create a Selection List.
2. Click New | Selection List to open the Selection List page.
3. Enter a Name to identify the selection list. Use a name that makes clear the type of data included in the list.
4. Enter your selection list values. Each entry is limited to 255 characters.

You can change the order of values using the icons to the right of the value name.

5. When you are finished, click Save and Close.

### Delivered Data Entry Templates

Publisher provides delivered content portlet templates that you can use to create published content portlets or branding portlets using the Portlet Editor and the Configure Portlet Wizard. These portlet templates include Data Entry Templates that the system automatically copies when you create a new published content or branding portlet. You can use these Data Entry Templates as they are or customize them to fit your organization's particular terminology or content collection needs. The table below lists the Data Entry Templates delivered with each portlet template, along with their property fields:

Table 9-2 Delivered Data Entry Templates by Portlet Type
Portlet Type | Data Entry Templates: Property fields
--- | ---
Announcement | Announcement: announcement (long text)
Community Directory | Howto Article: title (text), summary (long text), info (long text), hidden (boolean) Index: hidden (boolean) Info Article: title (text), summary (long text), info (long text), hidden (boolean) Main Page: edit (boolean), create (boolean), delete (boolean), search (boolean) Problem Article: title (text), summary (long text), cause (long text), resolution (long text), problem (long text), info (long text), hidden (boolean)
News | Index: items (list) Main Page: edit (boolean), create (boolean), delete (boolean), search (boolean), maxitems (integer) News Article: headline (text), abstract (text), body (long text), hidden (boolean)
Content Canvas | Content Canvas: text (long text)
Header | Header: text (long text)
Footer | Footer: text (long text)

All of the above also include the Name property.

## Creating and Editing Data Entry Templates

To create new Data Entry Templates and configure the delivered Data Entry Templates, you use the Data Entry Template Editor. This section discusses how to:

- Launch the Data Entry Template Editor.
- Use the Data Entry Template Editor.
- Copy, move, rename, and delete Data Entry Templates.

Note: | The easiest way to learn how Data Entry Templates work is to configure a delivered Data Entry Template when you create a published content portlet. For more information about creating and configuring published content portlets from delivered templates, see Creating Published Content Portlets.

### Launching the Data Entry Template Editor

You can open the Data Entry Template Editor from Publisher Explorer, the Configure Portlet Wizard, and the Presentation Template Editor. Only Publisher Explorer enables you to open the Data Entry Template Editor both to create a new template and to edit an existing template; the others enable you only to edit existing templates.

To open the Data Entry Template Editor from Publisher Explorer, perform one of the following actions:

- Click New | Data Entry Template.
- Right-click in the Publisher Explorer right pane and choose New | Data Entry Template.
- Right-click an existing Data Entry Template and choose Edit Data Entry Template.

To open the Data Entry Template Editor from the Configure Portlet Wizard on any Edit Objects page for an object category that includes a Data Entry Template, click Edit next to the template name.

To open the Data Entry Template Editor from the Presentation Template Editor, click the Data Entry Template name in the Data Entry Template field.

### Using the Data Entry Template Editor

To create or edit a Data Entry Template in the Data Entry Template Editor:

- Enter a unique Name for your Data Entry Template. You cannot use a Data Entry Template name that is already in use in the same folder.
- View the Presentation Template and Publishable fields. These fields are determined by the Presentation Template that you associate with the Data Entry Template. These fields are blank if you are creating a new Data Entry Template. They are populated after you save the Data Entry Template and associate it with a Presentation Template using the Presentation Template Editor.
- If you want the Content Item Editor to display instructions for users who are creating content items from this Data Entry Template, enter the instructions in the Instructions text box. You can format your instructions using a rich text editor.
- On the Advanced tab of the Configure Property page, you can set the default value for a property, set the property as a document property, and map it to a portal property.
- You can configure Publisher automatically to insert the content items created with this Data Entry Template into a List property in another content item. For example, in portlets created from the delivered News Portlet template, when a user creates a content item from the News Article Data Entry Template, that content item is inserted into the Items property of the Index content item. To accomplish this automatic insertion:

In the Insert items into this list group box, click Select Item.

In the Select Content Item dialog box, select the content item into which Publisher will insert list entries. Click OK.

Choose the List to which Publisher will add entries.

Note: | If you use automatic insertion, add a note to the List property in the corresponding Data Entry Template to inform users of the source of the content items and to let them know that they do not need to add new entries manually. For example, you might include the note, "This List property automatically includes all new content items created from the <Template_name> Data Entry Template."

- Add properties for each type of content you want captured by the content items created from the Data Entry Template.

For more information, see Adding Properties.

- When you are finished, click Save and Close.

Note: | The Data Entry Template must be attached to a Presentation Template before you can publish any content items created from it. To attach a Data Entry Template, use the Presentation Template Editor.

#### Adding Properties

In the Data Entry Template Editor, under Properties, create a property for each type of content you want captured by the content items that use the Data Entry Template. You can also enter default values for each property. While these defaults are not required, the example they provide can help users who are creating content items from the template.

To add a property:

1. Click Add Property to access the Configure Property page.
2. On the General tab, do the following:

Enter a Name for the property. All properties must have a name.

Caution: | If you change a property name in the Data Entry Template, you must also change any references to the property name in the associated Presentation Template.

If you want the property name that is displayed in Content Item Editor to differ from the name you entered above, enter a Display Name.

Select the property type from the Type list.

For information on each property type, see Property Types Available for Data Entry Templates.

If you select a Text property type, you can use the Maximum Length field to set a maximum number of characters enterable in the text box. The limit is 255 characters.

If you select a Long Text property type, select whether you want users to edit text with a Rich Text editor or with a Plain Text editor.

If you select a Selection List property type, you must choose an existing Selection List. The Select Selection List dialog box opens when you select Selection List from the Type list.

If you want the property to be required for checking in a content item, select Require value to check in. Publisher displays an error in the Content Item Editor if a user tries to check the item in without entering a value in the field.

If you want the property to be required for publishing in a content item, select Require value to publish. Publisher displays an error in the Content Item Editor if a user tries to publish the item without entering a value in the field.

If you want the Content Item Editor to display instructions for using the property, enter the instructions in the Instructions text box. You can format your instructions using a rich text editor.

1. You can set the default value for a property, set the property as a document property, and map it to a portal property on the Advanced tab.

You can define the default value of the data item. This value appears in the data entry field and can be seen by Contributors (or users with higher roles) when they create or edit content items derived from this Data Entry Template.

You can map a content item property to a portal property, and by associating the properties defined in the Data Entry Template with portal properties, those properties are indexed in the Search Server when content items created from the Data Entry Template are published (if associated with a portlet). This allows users to use Advanced Search to query for content items by specifying the portal property in the search criteria.
To select the Portal Property used by Search Server to index the property, do the following:
a. Click Select.
b. In the dialog, choose a portal property or search and find a property.
c. Click OK.

You can choose Set as Document Property if you want this property to be set as a document property when content items created from the Data Entry Template are published to or crawled into the Knowledge Directory. The Publisher attempts to find an attribute with the same name as this property in the portal's Global Document Property Map or in the document type identifier specified in this Data Entry Template.

1. When you are finished configuring a property, click Finish to return to the main page of the Data Entry Template Editor.
2. Each added property is listed in the Properties grid, including the property name, display name, property type, and required status. To move a property up or down in the list, use the Actions arrows at the right of each row. The list order in the Data Entry Template determines the display order in the Content Item Editor.

### Copying, Moving, Renaming, and Deleting Data Entry Templates

You can copy, move, rename, and delete Data Entry Templates in Publisher Explorer, just as you do with any Publisher component. Note the following considerations, however, when performing these functions on Data Entry Templates:

- When you copy a Data Entry Template and you want to preserve its association with its content items, copy the content items and the Data Entry Template simultaneously. Either copy the entire folder that contains the Data Entry Template and content items or multi-select and copy the Data Entry Template and content items. If you copy the Data Entry Template to a new folder and then copy content items into that folder, the copied content items will retain their association with the original Data Entry Template and will have no automatic association with the copy.
- If a content item includes an Item property that references a second content item and you copy both of those content items simultaneously, then the item reference in the copy of the first content item refers to the copy of the second content item. The same is true for Presentation Templates that refer to Data Entry Templates. If you do not copy them simultaneously, the reference will be to the original.
- You can move a Data Entry Template to another location without affecting content items that have been created from that Data Entry Template.

Caution: | Deleting a Data Entry Template deletes all content items created from it. There is no undo.