Things You Can Do with Content

Preparing to Add Content 5-3 Content Attributes Content attributes are associated with item types and page types, and store information about an item or page, such as the associated category, description, or perspectives. These attributes are included in the add and edit pages where users can provide information about the item or page they are adding or editing. Page group administrators can create their own item types and page types and specify exactly what information they want users to supply by choosing which attributes to include. In addition, page group administrators can create their own attributes for containing extra information. For a list of the content attributes provided by default, see Section A.2.1, Base Content Attributes . Display Attributes Display attributes are associated with regions, and display information about an item or portlet, such as the author, display name, and creation date. Page designers can choose which attributes to display in a region. Some content attributes can also be used as display attributes. See Section 10.2.9, Changing the Attributes Displayed in a Region . For a list of the display attributes provided by default, see Section A.2.2, Base Display Attributes .

5.2.1.1 Creating an Attribute

To create an attribute:

1. In the Navigator, click the link for the page group in which you want to create the

attribute. To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page.

2. Click the Attributes link.

3. Next to Create New, click the Attribute link.

4. In the Display Name field, enter a descriptive name for the attribute. The display

name is displayed as a label for the attribute whenever the attribute is used. Use up to 256 characters of any kind, except commas. When the Display Name contains one or more commas, it does not display properly in search-related attribute selection boxes. Although the attribute display name has no enforced uniqueness requirement, consider keeping it unique across your page groups. If you do not, users see duplicate names on attribute pick-lists, and are unable to determine which attribute belongs to which page group. For example, attributes display on a pick-list when a user creates a custom item type or selects custom search criteria.

5. From the Datatype list, choose the type of data that the attribute will store.

■ Boolean stores a value of 1 for TRUE or 0 for FALSE. Tip: If you create an attribute in a particular page group, that attribute is available only in that page group. If you want the attribute to be available in multiple page groups, either create it in the Shared Objects page group, or if the attribute already exists promote it to the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups . 5-4 Oracle Fusion Middleware Users Guide for Oracle Portal ■ Date stores a date in the format DD-MON-YYYY HH12:MI PM, for example, 20-SEP-2004 10:57 AM. ■ File stores a file, such as a Microsoft Excel spreadsheet or an HTML document. ■ Number stores a numeric value, for example, 8479. ■ PLSQL stores PLSQL code, for example, htp.print’Hello World’; ■ Text stores a text string. ■ URL stores the URL of a Web site or Web page, for example, http:www.oracle.com.

6. Click Create.

7. Click Close.

5.2.1.2 Editing an Attribute

You can specify how an attribute is displayed when users add or edit an item or page of a type that includes the attribute. For example, you can change the label for the attribute by editing the attribute’s display name. To edit an attribute:

1. Use the Navigator to browse to the attribute that you want to edit.

To get to the Navigator click the Navigator link on any page. By default you can find a Navigator link on the Portal Builder page.

2. In the row for the attribute, click the Edit link.

This opens the Edit Attribute page. The options available on this page vary a little from those options available when you first create the attribute. Notably, the page includes a Name attribute.

3. In the Name field, edit the name of the attribute. The name is used internally only.

The default value in the Name field is taken from the Display Name provided when the attribute was created. Spaces and special characters are discarded. For example, if the Display Name is R D Team Lead, the Name is RDTeamLead. The Name is not case sensitive. It must be unique within its page group and the Shared Objects page group. Use up to 256 alphanumeric characters A to Z, a to z, 0 to 9 and the underscore character _; spaces and other special characters are not allowed.

4. In the Display Name field, edit the descriptive name of the attribute. The Display

Name identifies the attribute to other users. It is used in the Portal Navigator and as the label for the attribute value wherever the attribute is used. Use up to 256 characters of any kind, except commas. When the Display Name contains one or more commas, it does not display properly in search-related attribute selection boxes. Any change you make here does not affect the value in the Name field. Changes to the attribute Display Name are not reflected immediately on cached pages. To make the change display immediately, you must clear the page groups cache. Go Tip: If the attribute is shared, it will be in the Shared Objects page group. See Section 4.6, Sharing Objects Across Page Groups