10 Working With Content Files

This section covers the following topics:

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:

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.

See "Contributor Data Files and Native Documents" 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" 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

    Create new icon
  3. Enter appropriate values for the Assign Info Form.

    For guidelines on naming Site Studio assets, see "Naming Site Assets".

  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"), the wizard can create a contributor data file for you.

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

    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.

  1. 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 Viewing the Content Information of a Content File

To view content information for a content file, perform these tasks:

  1. In the menu on the Site Assets pane, select the content file type.

  2. Select a content file from the list.

  3. Click the Doc Info icon (Figure 10-3).

    The content information page is displayed.

    Figure 10-3 Doc Info icon

    Document Info icon

10.5 Adding a Content File to a Site

To add a content file to a site, perform these tasks:

  1. In the menu on the Site Assets pane, select the content file type.

  2. Click the Add to Site icon (Figure 10-4).

    A search results page displays.

    Figure 10-4 Add to Site Icon

    Add to Site icon
  3. Select the content files to add, click Site Studio, and then Select Marked Documents.

  4. Depending on your configuration, you may receive a caution that you are about to add existing asset(s) to your site. Click OK.

    The content files are now associated with the Web site.

10.6 Removing a Content File from a Site

To remove a content file from a site, perform these tasks:

  1. In the menu on the Site Assets pane, select the content file type.

  2. From the list, select the content file to be removed and click the Remove From Site icon (Figure 10-5).

    When you remove a content file, you are simply removing its association with a site. You are not deleting the file from the content server.

    Figure 10-5 Remove from Site Icon

    Remove from Site icon

10.7 Editing a Contributor Data File

To edit the source of a contributor data file, perform these tasks:

  1. In the menu on the Site Assets pane, select Contributor Data Files.

  2. From the list, select the contributor data file to be edited and click the Edit icon (Figure 10-6).

    The selected contributor data file is opened and can be edited in source view.

    Figure 10-6 Edit Icon

    Edit icon

The design of a contributor data file is such that editing should be done through Contributor, rather than in Source view in Designer. While it is possible to edit the file directly, it is much easier to edit the contributor data file through Contributor or switch to a different file through the Switch Content Wizard (see Section 12.3, "Assigning Content With The Switch Content Wizard").

10.8 Working With Native Documents

In Site Studio, you can assign a contributor data file or a native document to a contribution region, and individual contributors can add and edit contributor data files and native documents on the Web site.

A contributor data file is generated by Site Studio. It is an XML file that is designed to be edited using the Contributor application. As an XML file, it is in a web-ready format that can be easily pulled into a web page (similar to the way an include file can be pulled into another web page).

A native document, however, is generated by a third-party application (Microsoft Word, Excel, PowerPoint, and so on) and is generally introduced by you or a contributor. The document, in its original state, cannot be viewed on a web page so it is converted into a web page (using Dynamic Converter) when the server delivers the page to the browser.

Unlike contributor data files, native documents do not require the Contributor for editing. The converted document displays in the placeholder as the page is displayed, and the appropriate application (Microsoft Word, and so on) is loaded when the contributor edits the data.

This section covers the following topics:

10.8.1 Requirements for Native Documents

A native document can be assigned to a contribution region in the same way that a contributor data file can. Native documents are added to the site in the same way that contributor data files are added to the site (create a link to the file, add the file to a dynamic list, or check the file in so that its metadata matches a dynamic list or a query performed on the site).

Unlike contributor data files, however, native documents require additional configuration steps on the server so that they appear on the Web site as intended. These steps include the following:

  • You must have Dynamic Converter installed and running on the content server so that it can convert native documents into web pages.

  • You must have Check Out and Open installed and running on the content server so that contributors can check out and edit a native document directly from the Web site using the menu on the contribution graphic.

  • The native documents must be a supported file format of Dynamic Converter.

  • By default, a blank Dynamic Converter template (one with minimal settings) is used to convert the document so that it looks similar to the original. To further customize the appearance of the web page so that it matches the site, you should fine tune the template (or templates) used to convert the document (see "Using a Conversion Definition With Native Documents").

  • You, or the contributors, must have the associated third-party application installed on the computer that is being used to edit the file.

  • If you, or contributors, plan to add native documents to the site using a method outside of Site Studio (for example, using the Oracle Content Server check-in form, WebDAV Client, or Web Folders), then you must check those files in with the same metadata used by the site, and if necessary, a section of the site.

10.8.2 Editing a Native Document

To edit a native document, perform these tasks:

  1. In the menu on the Site Assets pane, select Native Documents.

  2. From the list, select the native document to be edited and click the Edit icon (Figure 10-7).

    You must have Check Out and Open installed to edit a native document. Documents are opened in the appropriate application. For example, Microsoft Word or PowerPoint.

    Figure 10-7 Edit Icon

    Edit icon
  3. When you complete your edits, save the file. It is saved to the server.

10.8.3 Using a Conversion Definition With Native Documents

When you assign a native document to a contribution region (or allow contributor to add native documents to the site), conversions are used to transform native documents to display inline on a Web site. Conversion definitions specify the rules that are used to control how a native document is converted to HTML and displayed in the page.

When you have a defined conversion definition, adding native documents to the web page is as simple as adding any other asset.

To add a conversion definition to a region template, follow these steps:

  1. In the region template, right-click. The contextual menu displays.

  2. Select Insert Object, then select Dynamic Conversion.

    The Insert Dynamic Conversion dialog (see "Insert Dynamic Conversion Dialog") appears.

  3. Select the conversion definition from the menu, or enter the name of a new conversion definition.

  4. Click OK.

  5. The conversion definition is now part of the region template. A wcmDynamicConversion tag (see the Technical Reference Guide for Site Studio) is written to the Region Template and the name of the conversion definition is a parameter in the tag. You can now assign a native document by using the Assign Content dialog (see "Assign Content Dialog", or the contributor can add the native document.

The wcmConversionDefinition tag can also be written in source view directly.

With native documents, you do not have the kind of formatting control over the final web page like you do with contributor data files (which can be precisely controlled in an element).

As such, you should spend time designing conversion templates specific to your site and then encouraging contributors to use styles in the native document that you can map to styles in the conversion template.

10.8.4 Using Dynamic Converter Template Selection Rules

When you have native documents on your site, one thing you must do is specify a conversion definition to control the look and feel of those documents on the Web site. You can specify conversion templates or rules (which govern the use of conversion templates) in the conversion definition by using the Native Document Conversion Settings dialog (see "Native Document Conversion Settings Dialog").

The available templates and rules that appear in this dialog must be set up ahead of time using the Dynamic Converter Template Selection Rules page. To access the Template Selection Rules page you must have the dynamic converter component installed on your content server. From the main menu of the server, select Administration then Dynamic Converter Admin and then Template Selection Rules.

Figure 10-8 Dynamic Converter Template Selection Rules Page

Dynamic Converter Template Section Rule spage

On the Template Selection Rules page, you can create and edit rules, layouts, and more. For more information, see the Administrator's Guide for Dynamic Converter.

10.8.5 Sample Fragments for Native Documents

In the Toolbox, under "Other Fragments," there are a few fragments designed specifically for native documents that you can use. Each fragment enables you to add a native document directly to the page template (outside of a placeholder) and perform a dynamic conversion using a conversion template and layout from Dynamic Converter.

  • Dynamic Conversion: Adds a converted document to your page template. It includes three parameters that you can use to specify the document, a conversion template, and a conversion layout.

  • Dynamic Conversion IFrame: Similar to the first fragment except that it adds the converted document in an IFrame (so that you can scroll through the entire document without scrolling down the web page). It includes several parameters that you can use to specify the document, the template, and the attributes of the IFrame.

  • Random Conversion. Performs a random dynamic conversion of native documents based on a query specified in the content server. It includes four parameters that you can use to specify a query, a query limit, and the conversion templates.

While fragments offer many methods of incorporating native documents, you may find it more useful to directly assign the native document to placeholders. For more information on these fragments, see "Other Fragments".

10.8.6 Using Direct Delivery

Normally when a native doc is included in a website it is converted to HTML by DC and included in a web page. There are situations where it might be desirable to deliver the file, such as a Microsoft Word document, in its native format instead. Direct delivery allows this option. Using direct delivery, a Microsoft Word document may be delivered as a Microsoft Word document from the same friendly URL that would have previously delivered converted content. In previous versions of Site Studio it was possible to deliver PDF files directly; however, this involved redirecting to the weblayout URL and losing the site context. Direct delivery can now be used with PDF and any other native format to deliver the file from the friendly URL without the redirect to the weblayout, thus helping to maintain the users context within the site. This means that a path containing an entry such as /groups/public/documents would be seen in the users browser. The feature allows a global list of file extensions to be configured and then overrides may be applied, via custom section properties, at the section level.

For more information on enabling direct delivery, see the Technical Reference Guide for Site Studio.

10.9 Working With Images

Images are just as important as text in the construction of a Web site. They can serve as displays of information, anchors for text, or simple decoration to improve the look of a Web site.

Depending on the content server configuration, multiple renditions of an image may be automatically created and stored on the server. For instance, a small preview version of the image or a lower resolution of the image that was uploaded to the content server.