19 Working with Content Presenter Display Templates

Use Content Presenter display templates to define how selected content renders on a portal page. WebCenter Portal provides several built-in Content Presenter display templates, and a developer can create custom display templates in JDeveloper to meet specific requirements.

Permissions:

To perform the tasks in this chapter on shared Content Presenter display templates, you must have the application-level Create, Edit and Delete Content Presenter Templates permission. Users with the Application Specialist role have this permission by default. For more information about application-level permissions, see About Application Roles and Permissions in Administering Oracle WebCenter Portal.

To perform the tasks in this chapter, you need one of the following portal-level permissions:

  • Assets: Create, Edit, and Delete Assets or Create Assets and Edit Assets (standard permissions)

  • Content Presenter Templates: Create, Edit, and Delete Content Presenter Templates or Create Content Presenter Templates and Edit Content Presenter Templates (advanced permissions)

See About Roles and Permissions for a Portal.

About Content Presenter Display Templates

When you define a Content Presenter task flow, you must select a Content Presenter display template. The template defines how the selected content renders on the portal page.

On the Assets and Shared Assets pages, WebCenter Portal provides several built-in Content Presenter display templates, and a developer can create custom display templates in JDeveloper. If a Content Presenter display template is a shared asset (available to all portals), it is shown on the Assets page of all portals along with portal-specific display templates.

A Content Presenter display template can handle single content items, multiple content items, or a combination of the two. For example, a multiple content item template might render tabs for each item and then call a single item template to render the details of a selected item.

Note:

You cannot create or edit Content Presenter display templates in WebCenter Portal; they must be developed in JDeveloper and published to WebCenter Portal as a shared asset or as an asset for a specific portal.

For more information, see Working with Portal Assets in JDeveloper and Developing Content Presenter Display Templates in Developing for Oracle WebCenter Portal.

About the Built-in Content Presenter Display Templates

Oracle WebCenter Portal provides several built-in Content Presenter display templates.

Table 19-1 lists the built-in Content Presenter display templates provided for displaying single content items.

Table 19-1 Built-in Templates for Displaying Single Content Items

Single Content Item Display Templates View ID Description

Default Document Details View

oracle.webcenter.content.templates.default.document.details

Displays detailed information about any single content item including creation date, modification date, created by username, modified by username, path and any comments.

Default List Item View

oracle.webcenter.content.templates.default.list.item

Used by multiple content item views to display each individual item. Displays a single line with an icon and item name as a link that either displays or downloads the item when clicked.

Default List Item View for Folders

oracle.webcenter.content.templates.default.list.item

Used by a single content item view to display a single line with an icon and item name as a link that either displays or downloads the item when clicked.

Default View (default when no template is selected)

oracle.webcenter.content.templates.default.detail

Displays any single content item, either directly in the browser (images, HTML, text) or as a link that downloads the associated file when clicked.

Full Article View

oracle.webcenter.content.templates.sitestudio.fullarticle

Displays a full article, including the Title, Image, and Body of an article.

This is a responsive template, meaning that it uses CSS3 media queries to produce a layout that adjusts to the width of the browser.

This template requires Site Studio to be enabled on the Content Server, as it uses the RD_ARTICLE Site Studio region definition.

Table 19-2lists the built-in Content Presenter display templates provided for displaying multiple content items.

Table 19-2 Built-in Templates for Displaying Multiple Content Items

Multiple Content Item Display Templates View ID Description

Accordion View

oracle.webcenter.content.templates.default.list.panel.accordion

Displays multiple content items in an accordion format, where each item can be expanded to display its details.

Articles View (under the Site Studio Template category)

oracle.webcenter.content.templates.sitestudio.articles

Displays the summaries of multiple articles, including the Title, Image, and Summary of articles.

This is a responsive template, which means that it uses CSS3 media queries to produce a layout that adjusts to the width of the browser.

This template requires Site Studio to be enabled on the Content Server, as it uses the RD_ARTICLE Site Studio region definition.

Bulleted View

oracle.webcenter.content.templates.default.list.bulleted

Displays multiple content items in a bulleted list format. Only content items will be displayed; folder items will be omitted.

Bulleted with Folder Label View

oracle.webcenter.content.templates.default.list.bulleted.label

Displays multiple content items in a bulleted list format. The name of the folder containing the first item in the list will display as a label above the list. This template is intended to be used when datasourceType is set to dsTypeFolderContents to ensure that all items have the same parent folder. Only content items are displayed; folder items are omitted.

Carousel View

oracle.webcenter.content.templates.default.list.carousel

Displays multiple content items in a carousel format, where items can be browsed by moving a slider left or right.

Icon View

oracle.webcenter.content.templates.default.list.tile

Displays multiple content items in a tiled format with large icons and file names.

List View (default when no template is selected)

oracle.webcenter.content.templates.default.list.simple

Displays multiple content items in a simple list.

List with Details Panel View

oracle.webcenter.content.templates.default.list.details.panel

Displays multiple content items in a list on the left, with a panel to the right displaying the details of a selected item.

Sortable Table View

oracle.webcenter.content.templates.default.list.tabular

Displays multiple content items in a sortable table that includes the document name, date created, and date modified.

Tabbed View

oracle.webcenter.content.templates.default.list.panel.tabbed

Displays multiple content items as tabs that can be selected to display item details. content items in a simple list.

Creating a Content Presenter Display Template

If the available Content Presenter display templates do not meet your needs, a developer can create new custom templates.

Creating a Content Presenter display template is a complex task that requires a good understanding of Application Development Framework (ADF) and the performance implications of using Content Presenter. For this reason, custom Content Presenter display templates must be created by developers using JDeveloper.

A developer can publish a custom Content Presenter display template directly to WebCenter Portal (the portal server) as a shared asset or to a specific portal for immediate use and testing.

For more information, see Working with Portal Assets in JDeveloper and Developing Content Presenter Display Templates in Developing for Oracle WebCenter Portal.

Managing Content Presenter Display Templates

The following options are available on the Assets and Shared Assets page to enable you to manage Content Presenter display templates:

  • Delete—You can delete a custom Content Presenter display template when it is no longer required.

    For more information, see Deleting an Asset.

    Note:

    You cannot delete built-in Content Presenter display templates.

  • Upload—You can upload an archive file that contains a custom Content Presenter display template that has been developed using Oracle JDeveloper.

    For more information on uploading a template, see Uploading an Asset.

    Developers can create custom Content Presenter display templates as described in Creating Content Presenter Display Templates in Developing for Oracle WebCenter Portal.

  • Download—You can download a custom Content Presenter display template into an archive file for further development in JDeveloper.

    For more information see Downloading an Asset.

    Note:

    You cannot download built-in Content Presenter display templates.

  • Actions

    • Security Settings—You can control whether all users or only specific users or groups can access a Content Presenter display template.

      For more information, see Setting Security for an Asset.

      Note:

      You cannot change the security settings of built-in Content Presenter display templates.

    • Show Properties—Each Content Presenter display template has an associated Show Properties dialog that summarizes useful information about it.

      For more information, see Viewing Information About an Asset.

    • Edit Source—You can directly edit the source code of a custom Content Presenter display template.

      For more information, see Editing the Source Code of an Asset.

      Note:

      You cannot edit the source code of built-in Content Presenter display templates.

      Editing Content Presenter display templates is a fairly complex task. For this reason, unless the change is simple, it is recommended that editing templates should be carried out by developers in JDeveloper.

  • Available—You can control whether or not a Content Presenter display template is available for use in a portal by selecting or deselecting this check box.

    For more information, see Showing and Hiding Assets.