Working With Element Definitions Creating a New Content File Copying a Content File

Working With Definitions 9-15

9.10 Working With Element Definitions

Each element definition is used to specify a toolbar, and any customization scripts and validation scripts you may want to include. These scripts are included when creating each element definition. Elements are controlled by element definitions. An element is basically an instantiation of its associated element definition, which specifies the editing experience available to contributors for the element on the web page specifically, what editing features are available in the Contributor editor. Element definitions are individually managed site assets, which means that they can be reused within a Web site, or even across Web sites providing all sites are managed on the same content server. Elements of the same type may have different element definitions associated with them to provide different editing environments for contributors depending on the context in which the element is used. Similarly, multiple elements may share the same element definition, providing the same editing experience to contributors for each of the elements.

9.11 Viewing Definitions in Designer

There are two ways to view a definition while in Designer: Source view, and Form view. Each offers a different way to look at each definition while working with that template in Designer. In each definition window in the Designer workspace, there will be two tabs at the bottom. Select the tab to choose the Source view or the Form view for that definition. This section covers these topics: ■ Form View on page 9-15 ■ Source View on page 9-16

9.11.1 Form View

Form view is a graphical user interface for working with a definition. Using the form view, the different options for each definition are easily modified within the dialog. All options available to modify in form view are also available in source view. Form view provides a dialog in which you can set the properties of definitions; for example, element definitions, region definitions, placeholder definitions, and conversion definitions. Figure 9–9 shows an example of a region definition in form view. Most form views have a Help button that you can click to see context-sensitive help information for the current form. 9-16 Oracle Fusion Middleware Users Guide for Site Studio Designer Figure 9–9 Form View Region Definition

9.11.2 Source View

Source view displays the code for the definition. Figure 9–10 Source View The information in source view is displayed as color-coded text: ■ Black is used for XML code, HTML tag attributes, and text that appears on the web page. Working With Definitions 9-17 ■ Purple is used for HTML tags. ■ Blue is used for HTML tag attribute values. ■ Green is used for Idoc Script, HTML comments, and code inserted by Site Studio. You can change many of these settings, including the typeface, indentation levels, and line wrapping. See Formatting the Code in Source View on page 6-9 for more information. Source view offers complete control over the site template. This can be especially true if you are implementing several custom assets. In fact, you may find yourself starting off in design view to create the page and then switching to source view to customize the appearance and behavior of the page.

9.12 Definition Bundles

Definition bundles are bundles of site assets; typically a definition and related templates. However, it can be a varying combination of definitions and templates depending on how the bundle is constructed. This section covers the following topics: ■ About Definition Bundles on page 9-17 ■ Downloading Bundles on page 9-17 ■ Uploading Bundles on page 9-18

9.12.1 About Definition Bundles

Definition bundles are zipped compressed collections of definitions and related templates, if applicable. A definition bundle is a simple method to take a related grouping of definitions and copy them to another Web site, or to a completely different content server. The definition bundle includes the selected definition, and the related definitions below the selected definition in the hierarchy. If you bundle a selected region definition, then it will include all associated region templates, and element definitions. If you select a placeholder definition, it will bundle all subtemplates, region definitions, region templates, and element definitions associated with the placeholder definition.

9.12.2 Downloading Bundles

When you choose to download a bundle, it is automatically zipped for you, and you will download the zipped file. There are two ways you can download a definition bundle. You can download a definition bundle based on a selected definition directly from the site assets pane, or you can use the Oracle Content Server to select a definition and download the bundle based on that definition. Downloading from the Site Assets Pane To download a definition bundle from the site assets pane, perform these steps: 1. Select a definition either placeholder definition, region definition, or element definition in the site assets pane. 2. Right-click the definition. 9-18 Oracle Fusion Middleware Users Guide for Site Studio Designer A menu is displayed.

3. Select Download Definition Bundle.

The save dialog appears. 4. Name and save the bundle to the local instance. Downloading from the Menu Bar To download a definition bundle from the menu bar, perform these steps:

1. From the menu bar, select File, then Definitions, then Download.

2. Select either Placeholder Definition Bundle, Region Definition Bundle, or

Element Definition Bundle . Oracle Content Server search results are displayed based on the selected definition type. 3. Select the definition to create and download the bundle from. The save dialog appears. 4. Name and save the bundle to the local instance.

9.12.3 Uploading Bundles

When you upload a bundle in Designer, it is automatically unpacked and associated with the Web site you had open in Designer when you uploaded. The bundle, when packed and downloaded, has the Web site you bundled it from still associated with it in the xWebsites metadata field for more information on metadata, see the Technical Reference Guide for Site Studio. The site that is open in Designer will have its metadata value added to the xWebsites field. If you upload the bundle again, it will have the new Web site value appended to the xWebsites metadata field, and so forth. The previous value will not be deleted; this means that the site assets you upload this way will have both Web sites in the value. If you upload through the Oracle Content Server, the bundle will not be immediately unpacked. When you upload through Designer, there is a reference point of which Web site the bundle should be associated with once unpacked. When uploading through Oracle Content Server, there is no reference for updating the xWebsites field. You will be prompted to select which Web sites to associate the content with when you unpack the bundle. Unpacking a bundle on the Oracle Content Server is a separate step from uploading a bundle. When you go to the Manage Archives page see the Administrator and Managers Guide for Site Studio, you will need to further unpack it and associate it with the appropriate Web site or sites. Uploading from Designer To upload a definition bundle to the Oracle Content Server from Designer, perform these steps:

1. From the menu bar, select File, then select Definitions, then select Upload

Definition Bundle... . 2. In the Open dialog, browse to the definition bundle on your file system and then click Open. 3. The definition bundle is automatically uploaded to the Oracle Content Server. Working With Definitions 9-19 Once uploaded, it is automatically unpacked and the xWebsites metadata field data is filled with the Web site that was open in Designer when you uploaded the bundle. 9-20 Oracle Fusion Middleware Users Guide for Site Studio Designer 10 Working With Content Files 10-1 10 Working With Content Files This section covers the following topics: ■ About Content Files on page 10-1 ■ Creating a New Content File on page 10-2 ■ Copying a Content File on page 10-3 ■ Viewing the Content Information of a Content File on page 10-4 ■ Adding a Content File to a Site on page 10-4 ■ Removing a Content File from a Site on page 10-4 ■ Editing a Contributor Data File on page 10-4 ■ Working With Native Documents on page 10-5 ■ Working With Images on page 10-9

10.1 About Content Files

Content files are the files used to store any of the materials viewed on a Web site. These files contain the site content modified by templates and definitions, and editable through Contributor, such as contributor data files and images. Native documents are also content files. This section is about the types of content files and related files as viewed in the Site Assets pane: ■ Contributor Data Files on page 10-1 ■ Native Documents on page 10-2 ■ Conversion Definitions on page 10-2 ■ Images on page 10-2

10.1.1 Contributor Data Files

A contributor data file is an XML file that is created and maintained by Site Studio. It is used to store the content of a Web site and checked in to the content server. If a site contributor wants to update the content of a web page, its associated contributor data file is retrieved from the server and the data made available in the Contributor editor, where the contributor can modify the content. After the contributor is done making changes to the data file, it is checked back in to the content server and the web page is updated to reflect the new content. 10-2 Oracle Fusion Middleware Users Guide for Site Studio Designer See Contributor Data Files and Native Documents on page 3-22 for more information.

10.1.2 Native Documents

A native document is a third-party file that is viewed in Site Studio and edited using the application originally used to create it for example, Microsoft Word is used for Word documents. When the file is checked in, it is converted into HTML using Dynamic Converter and then made available to the web page. See Contributor Data Files and Native Documents on page 3-22 for more information.

10.1.3 Conversion Definitions

A conversion definition is used to transform a native document to display inline on a Web site. The conversion definition is a rule, template, or combination that defines how a native document is converted to HTML and displayed in the page. When you add a native document to a web page, the conversion definitions can specify a Dynamic Converter template or rule that is used to convert the document into HTML.

10.1.4 Images

You can add, copy, and remove images from your site. The supported image formats are GIF and JPG. Images cannot be added to a Web site until they are added to the content server as an asset.

10.2 Creating a New Content File

To create a content file, perform these tasks: 1. In the menu on the Site Assets pane, select the content file type to create. 2. Click the Create New icon Figure 10–1 , select New, and then select the specific document type to create. The Assign Info Form displays for you to check the item into the content server. Figure 10–1 Create New Icon 3. Enter appropriate values for the Assign Info Form. For guidelines on naming Site Studio assets, see Naming Site Assets on page 4-3.

4. When complete, click Assign Info.

5. The content file is created. You may find that the most common method of creating the contributor data files is when you assign content. When you run the Switch Content wizard see Switch Content Wizard on page A-107, the wizard can create a contributor data file for you. Working With Content Files 10-3

10.3 Copying a Content File

You can select a content file from the list to copy, select a content file from the content server to copy, or select a content file from your local instance to copy. Copying a content file from the Site Assets pane 1. In the menu on the Site Assets pane, select the content file type. 2. Select the content file you want to copy from the list. 3. Click the Create New icon Figure 10–2 , select Copy, and then Selected: The Assign Info Form displays for you to check the item into the content server. Figure 10–2 Create New Icon

4. Enter appropriate values for the Assign Info Form.

5. When complete, click Assign Info.

6. The content file is copied.

Copying a content file from the content server 1. In the menu on the Site Assets pane, select the content file type.

2. Click the Create New icon

Figure 10–2 , select Copy, and then from Server. A search results page displays.

3. Click the corresponding Select button of the one you want to copy.

The Assign Info Form displays for you to check the item into the content server.

4. Enter appropriate values for the Assign Info Form.

5. When complete, click Assign Info.

6. The content file is copied.

Copying a content file from your local instance 1. In the menu on the Site Assets pane, select the content file type. 2. Click the Create New icon Figure 10–2 , select Copy, and then from Local. A navigation window displays.

3. On your local instance, navigate to the content file you want to copy.

4. Select the contributor data file and click Open.

The Assign Info Form displays for you to check the item into the content server.

5. Enter appropriate values for the Assign Info Form.

6. When complete, click Assign Info.

7. The content file is copied.

10-4 Oracle Fusion Middleware Users Guide for Site Studio Designer

10.4 Viewing the Content Information of a Content File