33 Publishing Content Using Content Presenter

Publish content from Content Server on a portal page using the Content Presenter task flow.

See Also:

For an overview of the different options available in WebCenter Portal for working with portal content and adding content to a portal, see Introduction to Working with Content in a Portal.

Permissions:

To perform the tasks in this chapter, you must be a portal manager or a portal member with the portal-level permissions Basic Services: Edit Page Access and Structure, Assets: Edit Assets, and Documents: View Documents (standard permissions) or Pages: Edit Pages and Task Flows: Edit Task Flows, and Documents: View Documents (advanced permissions).

See About Roles and Permissions for a Portal.

About Content Presenter

The Content Presenter task flow enables you to precisely customize the selection and presentation of content from Content Server.

The Content Presenter task flow is available only if your system administrator has completed the prerequisite Content Server configuration. For more information, see Managing Connections to Oracle WebCenter Content Server in Administering Oracle WebCenter Portal.

See Also:

"Creating and Using Templates for the Content Presenter Task Flow" tutorial (http://www.oracle.com/technetwork/middleware/webcenter/portal/learnmore/wcp-cp-templates-1555892.pdf) on the Oracle Technology Network

In the Content Presenter task flow, you can select a single item of content, contents under a folder, a list of items, or query for content, and then select a display template to render that content on a page in a portal.

Note:

  • Content Presenter is intended to render (present) content; not to host HTML content. To host HTML content, use the Web Page component to render the HTML content from Content Server. For more information, see Working with the Web Page Component.

  • Content Server exposes a content item only after it has a revision status of Released. If a content item does not have Released status, you will not be able to configure Content Presenter to show the item. You can find the status of a content item in Content Server on the Content Information Page, as described in Revision Status in Using Oracle WebCenter Content.

In addition to displaying the folders and files in Content Server, Content Presenter integrates with Oracle Site Studio to allow you to create, access, edit, and display Site Studio contributor data files. For more information, see Understanding Site Studio Integration.

Content Presenter has no dependency on the Documents tool for adding or managing the content it displays.

Understanding Site Studio Integration

Oracle Site Studio is a powerful, flexible web development application suite that offers a comprehensive approach to designing, building, and maintaining enterprise-scale web sites. Site Studio uses Oracle WebCenter Content Server as the main repository for a web site.

Content Presenter integrates with Site Studio to allow you to create, access, edit, and display Site Studio contributor data files in a custom Content Presenter display template that makes use of region definitions.

Tip:

Although Content Presenter also supports Site Studio region templates, it is recommended that you use Content Presenter display templates (that use region definitions) to integrate Site Studio and Oracle WebCenter Portal. The region templates display the details of the contributor data file rather than the contributed content. For more information, see Developing Content Presenter Display Templates in Developing for Oracle WebCenter Portal.

Before you can display Site Studio contributor data files in Content Presenter, the system administrator must enable the following components in WebCenter Content Server:

  • Site Studio components. The system administrator must also configure the cookie path to the context root of your application to prevent losing your session when editing Site Studio content. For more information, see Configuring Oracle WebCenter Content Server and Setting Up Site Studio in Administering Oracle WebCenter Portal

  • WebCenterConfigure and Portal VCRHelper components. This allows for adding and editing Site Studio documents from within Content Presenter. For more information, see Enabling the WebCenterConfigure Component in Administering Oracle WebCenter Portal.

For proper surfacing in Content Presenter, the following link types can be used in a Site Studio contributor data file (or in a Site Studio region template):

  • Links to nodes in the portal navigation (for more information, see Adding Links from Content to Navigation Nodes)

  • Links to inline images

  • Links to documents (except for absolute or relative path links)

    When clicking the link at runtime, it renders within the context of the application and displays the document using the Default View display template.

  • Absolute HTTP links, whether created in Site Studio contributor mode or in Site Studio Designer region template HTML

The following Site Studio link types are not supported in Content Presenter:

  • Links to Site Studio sections

  • Absolute or relative path links to Site Studio documents

For guidelines on authoring recommendations for displaying a Site Studio contributor data file in Content Presenter, see Authoring Site Studio Content to Optimize Presentation in Content Presenter.

You can create and edit Site Studio contributor data files from the Content Presenter Configuration dialog (see Creating or Editing Site Studio Content in the Content Presenter Configuration Dialog) or in-context when displayed in Content Presenter at runtime (see Creating and Editing Files In-Context in a Content Presenter Task Flow).

For more information about creating and using Site Studio contributor data files and Site Studio region templates, refer to the Oracle WebCenter Content documentation library (http://docs.oracle.com/cd/E28280_01/webcontent.htm).

About Content Presenter and Workflow

You can view content items displayed in Content Presenter while they are in a workflow, including Site Studio contributor data files displayed in a Site Studio region template.

In order for a content item in workflow to display in Content Presenter, it must have had Released status at some point. If the content item has never had Released status, it will not display in Content Presenter.

As long as the content item has at some point had Released status in Content Server, if a revision of the content item is pending in workflow, Content Presenter allows approvers for the content item to toggle between the published version and the version in workflow in the page editor (Figure 33-1) or in contribution mode, and also provides links to approve or reject the item in workflow, and view additional details about the item (including workflow name, steps performed, action performed, date of action, and who performed the action).

Figure 33-1 Preview File in Workflow to Approve or Reject in Content Presenter

Description of Figure 33-1 follows
Description of "Figure 33-1 Preview File in Workflow to Approve or Reject in Content Presenter"

For more information about working with files in workflow in Content Presenter, see Viewing Workflow Files in a Content Presenter Task Flow.

Working with the Content Presenter Task Flow

In the Content Presenter task flow, you can select a single item of content, contents under a folder, a list of items, or query for content, and then select a display template to render that content on a page in a portal.

Adding a Content Presenter Task Flow to a Page

To display content from your Content Server on a page, add and configure a Content Presenter task flow.

To add a Content Presenter task flow to a page:

  1. Open the page in the page editor.

    For more information, see Opening a Page in the Page Editor.

  2. Click Add Content in the area of the page where you want to add the Content Presenter task flow to open the resource catalog.

  3. In the resource catalog, navigate to the Content Presenter task flow, or search for it.

    Tip:

    The presence or location of this task flow depends on how the resource catalog is configured. For example, in the default resource catalog, open the Content Management folder to locate the Content Presenter task flow.

  4. Add the Content Presenter task flow to the page in one of the following ways:
    • Click the task flow in the resource catalog to add it to the area where you clicked Add Content.

    • Drag the task flow from the resource catalog to the target location on the page.

    A new empty region appears on your page.

  5. After adding the empty Content Presenter task flow to the page, edit it to select the content that you want to display.

    For more information, see Selecting Content.

Selecting Content

After you add a Content Presenter task flow to a page, you must configure it to select the content that you want to display.

Note:

Content Presenter does not support non-ASCII characters in files that are encoded using non-UTF-8 character encoding. When users preview such files in Content Presenter, non-ASCII characters appear garbled.

This section includes the following topics:

Displaying the Content Presenter Configuration Dialog

The Content Presenter Configuration dialog enables you to easily configure the Content Presenter task flow to select or change content, or select a different display template.

To display the Content Presenter Configuration dialog:

  1. Open the page in the page editor.

    For more information, see Opening a Page in the Page Editor.

  2. Click anywhere in the Content Presenter task flow.
  3. In the toolbar, click Edit (Figure 33-2).

    Figure 33-2 Component Toolbar for Content Presenter Task Flow

    Description of Figure 33-2 follows
    Description of "Figure 33-2 Component Toolbar for Content Presenter Task Flow"

    The Content Presenter Configuration dialog opens (Figure 33-3).

    Figure 33-3 Content Presenter Configuration Dialog

    Description of Figure 33-3 follows
    Description of "Figure 33-3 Content Presenter Configuration Dialog"

    Tip:

    A check mark alongside an item indicates that the required information is complete and valid.

Selecting a Single Content Item

You can display a single item from your Content Server (including a Site Studio contributor data file) in a Content Presenter task flow

To select a specific item:

  1. Open the Content Presenter Configuration dialog.
  2. Click Select Content or the Content tab.
  3. On the Content tab, from the Content Source list, select Single Content Item.

    Figure 33-4 Selecting the Content Source: Single Content Item

    Description of Figure 33-4 follows
    Description of "Figure 33-4 Selecting the Content Source: Single Content Item"
  4. Click Browse to locate the content item in the content repository.

    Note:

    Content Server exposes a content item in the Select Document dialog only after it has a revision status of Released. The revision status of a new content item changes from Done to Released after it has reached its specified release date (specified by the dInDate property). Content items that do not have Released status will not appear in the Select Document dialog. You can find the status of a content item in Content Server on the Content Information Page, as described in Revision Status in Using Oracle WebCenter Content.

    If WebCenter Portal is connected to multiple Content Server repositories, the browse tree shows the parent folder for the current user, or for the current portal, in the repository that is specified as the primary connection. To access other connected repositories, click the navigation list icon in the toolbar to expose the VCR parent node. Click VCR to show all connected content repositories.

    Figure 33-5 Navigating to Other Content Repositories

    Description of Figure 33-5 follows
    Description of "Figure 33-5 Navigating to Other Content Repositories"

    Notes:

    • iFraming is supported only for the default Content Server connection. Therefore, you cannot select a non-default Content Server connection if the Content Presenter task flow will use iFrames to display content.

    • If the content repository includes an invalid type configuration, then no content displays when you click Browse. Instead, an error message reports Unable to retrieve content type information.

  5. Select the item that you want to display and click Select.

After choosing your content, you must select a Content Presenter display template. For more information, see Selecting a Display Template.

Selecting the Contents of a Folder

You can display the contents of a folder from Content Server in a Content Presenter task flow. The contents of the folder are displayed in the order stored in the folder.

To select a folder:

  1. Open the Content Presenter Configuration dialog.
  2. Click Select Content or the Content tab.
  3. On the Content tab, from the Content Source list, select Contents Under a Folder.

    Figure 33-6 Selecting the Content Source: Contents Under a Folder

    Description of Figure 33-6 follows
    Description of "Figure 33-6 Selecting the Content Source: Contents Under a Folder"
  4. Click Browse to locate the folder in the content repository.

    Tip:

    To select the folder as the content source, click in the folder row, not on the folder name (clicking the folder name opens the folder).

    If WebCenter Portal is connected to multiple Content Server repositories, the browse tree shows the parent folder for the current user, or for the current portal, in the repository that is specified as the primary connection. To access other connected repositories, click the navigation list icon in the toolbar to expose the VCR parent node. Click VCR to show all connected content repositories (Figure 33-5).

    Notes:

    • iFraming is supported only for the default Content Server connection. Therefore, you cannot select a non-default Content Server connection if the Content Presenter task flow will use iFrames to display content.

    • If the content repository includes an invalid type configuration, then no content displays when you click Browse. Instead, an error message reports Unable to retrieve content type information.

  5. Select the folder whose contents you want to display and click Select.
After choosing your content, you must select a Content Presenter display template. For more information, see Selecting a Display Template.
Selecting Content Based on the Results of a Query

You can display content in a Content Presenter task flow based on a query conducted against the Oracle WebCenter Content Server repository.

All query criteria are optional. If you leave all options empty, all documents in the WebCenter Content Server repository will be returned by the search.

Note:

To select content based on the results of a query against the connected repository, full-text search must be enabled in WebCenter Content Server through OracleTextSearch, as described in Configuring OracleTextSearch for Content Server in Administering Oracle WebCenter Content.

To specify a content query:

  1. Open the Content Presenter Configuration dialog.
  2. Click Select Content or the Content tab.
  3. On the Content tab, from the Content Source list, select Results of a Query.

    Figure 33-7 Selecting the Content Source: Results of a Query

    Description of Figure 33-7 follows
    Description of "Figure 33-7 Selecting the Content Source: Results of a Query"
  4. In the File Name field, enter the name of a file in the Content Server repository that you want to display in the Content Presenter task flow.

    You can use * as a wild card character to retrieve multiple files.

    For example, *.jpg.

  5. In the Keywords field, enter any words or phrases that might be present in the content of the documents.
  6. From the Content Types list, select:
    • All Content Types to retrieve content items regardless of the content type.
    • The name of a content type profile or Site Studio region template definition defined in Content Server.

    A content type profile specifies properties that define a specific type of content, for example, a press release; news flash; or image. The content type IDC:GlobalProfile is the name of a default content type profile defined in Content Server that can be applied if no other content type profiles are defined.

  7. In the Limit Results field, enter the maximum number of content items to be returned by the query.

    The default is 100.

  8. To retrieve content items based on creation date:
    1. From the Created list, select:
      • is to search for content items created on the specified date

      • is after to search for content items created after the specified date

      • is before to search for content items created before the specified date

      • is between to search for content items created between the two specified dates

    2. In the corresponding date field(s), enter a date.
  9. To retrieve content items based on when they were last edited, select:
    1. From the Last Modified list, select
      • is to search for content items last modified on the specified date

      • is after to search for content items last modified after the specified date

      • is before to search for content items last modified before the specified date

      • is between to search for content items last modified between the two specified dates

    2. In the corresponding date field(s), enter a date.
  10. To retrieve content items based on who first uploaded them, in the Created By field, enter the user name.

    If you are not sure of the user name, click the Select user name icon and browse for users. For tips on searching for a user in the identity store, see Searching for a User or Group in the Identity Store

  11. To retrieve content items based on who last edited them, in the Last Modified By field, enter the user name name.

    If you are not sure of the user name, click the Select user name icon and browse for users. For tips on searching for a user in the identity store, see Searching for a User or Group in the Identity Store

  12. If you selected a specific content type in the Content Type list you can also:
    1. Define Additional Query Filters to refine the query based on one or more specific property settings

      Click Add and select from the available properties.

    2. Specify a Sort Order based on the properties available for the content type.

      From the Sort On list, select the property to sort by, then select whether to sort in ascending or descending order.

    If Content Type is set to IDC:Global Profile, then Additional Query Filters is not available.

  13. Click Preview Results to see the results of the query.

    Based on the results shown in the preview, you can accept or modify your search criteria.

    Note:

    If the content repository includes an invalid type configuration, then no content displays when you click Preview Results. Instead, an error message reports Unable to retrieve content type information.

After choosing your content, you must select a Content Presenter display template. For more information, see Selecting a Display Template.
Selecting a List of Content Items

You can create a list of content items to display in a Content Presenter task flow.

To browse or search for any number of items to add to a list, and delete or reorder the items before adding the list to a page in a Content Presenter display template:

  1. Open the Content Presenter Configuration dialog.
  2. Click Select Content or the Content tab.
  3. On the Content tab, from the Content Source list, select List of Items.

    Figure 33-8 Selecting the Content Source: List of Items

    Description of Figure 33-8 follows
    Description of "Figure 33-8 Selecting the Content Source: List of Items"
  4. Under Select Items to Display, click Add to browse or search for any number of items to add to the list.

    Figure 33-9 Selecting Items to Display

    Description of Figure 33-9 follows
    Description of "Figure 33-9 Selecting Items to Display"
  5. In the Select One or More Content Items dialog, select multiple content items using Ctrl+click or Shift+click.

    Note:

    Content Server exposes a content item in the Select One or More Content Items dialog only after it has a revision status of Released. The revision status of a new content item changes from Done to Released after it has reached its specified release date (specified by the dInDate property). Content items that do not have Released status will not appear in the Select One or More Content Items dialog. You can find the status of a content item in Content Server on the Content Information Page, as described in Revision Status in the Using Oracle WebCenter Content.

    If WebCenter Portal is connected to multiple Content Server repositories, the browse tree shows the parent folder for the current user, or for the current portal, in the repository that is specified as the primary connection. To access other connected repositories, click the navigation list icon in the toolbar to expose the VCR parent node. Click VCR to show all connected content repositories (Figure 33-5).

    Note:

    • iFraming is supported only for the default Content Server connection. Therefore, you cannot select a non-default Content Server connection if the Content Presenter task flow will use iFrames to display content.

    • If the content repository includes an invalid type configuration, then no content displays when you click Browse. Instead, an error message reports Unable to retrieve content type information.

  6. When you have selected all the items that you want to display, click Select.

    You can add more items to the list later by clicking Add again.

  7. Use the arrow buttons to rearrange the order of the items in the list.

    The order you use when creating the list is the order in which they are presented at runtime.

After choosing your content, you must select a Content Presenter display template. For more information, see Selecting a Display Template.

Selecting a Display Template

By default, WebCenter Portal selects an appropriate Content Presenter display template based on the type of content selected. You can change the default template as required.

Note:

Although Site Studio region templates are supported, it is recommended that for Site Studio contributor data files, you use Content Presenter display templates that use region definitions instead. Site Studio region templates display the details of the contributor data file rather than the contributed content. For information about Site Studio region templates, refer to the Oracle WebCenter Content documentation library (http://docs.oracle.com/cd/E28280_01/webcontent.htm).

To change the display template for the selected content:

  1. Open the Content Presenter Configuration dialog.
  2. Click Select Template or the Template tab.
  3. If the Content Source selected on the Content tab is a multiple content item source (Contents Under a Folder, Results of a Query, or List of Items), from the Template Category list, select:
    • Default Templates to select one of the built-in Content Presenter display templates.

      See Table 19-1 and Table 19-2.

    • Site Studio Templates to select a Content Presenter display template that uses region definitions to display Site Studio contributor data files.

      Although Site Studio region templates are supported, they display the details of the contributor data files rather than the contributed content. It is strongly recommended that for Site Studio contributor data files, you use Content Presenter display templates that use region definitions instead.

    • Custom Template Category to select a custom Content Presenter display template, if any exist. There may be multiple custom template categories listed.

      Custom Content Presenter display templates are created in Oracle JDeveloper and published to WebCenter Portal as described in Creating Content Presenter Display Templates in Developing for Oracle WebCenter Portal.

    Figure 33-10 Selecting the Template Category (for Multiple Content Items)

    Description of Figure 33-10 follows
    Description of "Figure 33-10 Selecting the Template Category (for Multiple Content Items)"
  4. From the Template list, select the Content Presenter display template that you want to use.

    The templates that are available for selection in the Template list are those that are identified by Content Presenter as suitable for displaying the selected content item source type. If you select a Single Content Item, only those templates that display single items are listed. If you select a multiple content item source (Contents Under a Folder, Results of a Query, or List of Items), only those templates that display multiple items (and are of the selected Template Category) are listed (Figure 33-12).

    Figure 33-11 Selecting the Display Template (for Single Content Items)

    Description of Figure 33-11 follows
    Description of "Figure 33-11 Selecting the Display Template (for Single Content Items)"

    Figure 33-12 Selecting the Display Template (for Multiple Content Items)

    Description of Figure 33-12 follows
    Description of "Figure 33-12 Selecting the Display Template (for Multiple Content Items)"

    The Template list includes built-in display templates, custom display templates (created in JDeveloper and published to WebCenter Portal), and Site Studio region templates.

    Note:

    Choose templates appropriate to the type of content. Site Studio region templates should be used for Site Studio defined Contributor Data Files (CDF). Using non-Site Studio templates will display the details of the CDF file, rather than the content; using Site Studio templates for non-Site Studio content will simply not display. To identify the Site Studio region templates, hover your mouse pointer over the templates in the list to display hint text identifying the Site Studio region templates.

    For more information, see Understanding Site Studio Integration.

    If you create a Site Studio contributor data file directly from the Content Presenter Configuration dialog, as described in Creating or Editing Site Studio Content in the Content Presenter Configuration Dialog, the Site Studio region templates that match the region definition of the Site Studio contributor data file might not be immediately shown in the Template list. In this case, select the default template, and click Save. Then, open the Content Presenter Configuration dialog again to find the Site Studio region templates in the Template list.

Previewing Content in the Content Presenter Configuration Dialog

You can get an idea of how your selected content will look using the selected display template before exiting the Content Presenter Configuration dialog.

To preview content in the Content Presenter Configuration dialog:

In the Content Presenter Configuration dialog, click Preview or the Preview tab.

The appearance of the content on the Preview tab is dependent on whether the selected display template uses a stretch or flow layout. While the final view of the task flow can be configured to use either a stretch layout or a flow layout, the Preview tab only uses a flow layout. As a result, the preview of content using templates that were designed for a stretch layout displays unstretched at a fixed default size. This is the normal behavior of stretchable content when displayed in non-stretching flow layout. To allow stretchable content to stretch to its full size and fill the task flow space entirely, click the View Actions icon in the task flow toolbar, and select Display Options. In the Advanced tab of the Display Options dialog, from the Stretch Content list, select true.

See Setting Component Display Options Properties.

Note:

Content Presenter does not support non-ASCII characters in files that are encoded using the non-UTF-8 character encoding. When users preview such files in Content Presenter, non-ASCII characters appear garbled.

If the file is in workflow, you will see a workflow notification area at the top, as described in About Content Presenter and Workflow.

Using Responsive Templates

The Articles View and Full Article View Content Presenter display templates use responsive layouts to display their content.

About Responsive Templates

Responsive templates enable you to display content that adjusts to the width of the browser.

Responsive templates include different layouts based on the width of the browser.

Oracle WebCenter Portal provides two built-in responsive Content Presenter display templates as samples for you to use as a starting point for creating your own:

  • Articles View template—Use this template to display a list of articles, providing links that display the full article details.

  • Full Article View template—Use this template to display a full article, including the title, image and body of the article.

Articles View Template

As well as providing different layouts, the Articles View template also uses different font and image sizes depending on the width of the browser.

If the browser is narrow (up to 480 pixels, for example, an iPhone), then the template lists the articles in a single column (Figure 33-13).

Figure 33-13 Articles View Single Column Layout

Description of Figure 33-13 follows
Description of "Figure 33-13 Articles View Single Column Layout"

If the browser is slightly wider (up to 780 pixels, for example, an iPad in portrait orientation), then the template lists the articles in two columns (Figure 33-14).

Figure 33-14 Articles View Two Column Layout

Description of Figure 33-14 follows
Description of "Figure 33-14 Articles View Two Column Layout"

If the browser is wide (over 780 pixels), then the template lists the articles in three columns (Figure 33-15).

Figure 33-15 Articles View Three Column Layout

Description of Figure 33-15 follows
Description of "Figure 33-15 Articles View Three Column Layout"

Full Article View Template

With the Full Article View template, if the browser is narrow (up to 480 pixels, for example, an iPhone), then the template displays an article with the image taking up the full width of the template (Figure 33-16).

Figure 33-16 Full Article View Template Narrow View

Description of Figure 33-16 follows
Description of "Figure 33-16 Full Article View Template Narrow View"

If the browser is wider (over 480 pixels), then the template displays an article with the image displayed to the right (Figure 33-17).

Figure 33-17 Full Article View Template Wide View

Description of Figure 33-17 follows
Description of "Figure 33-17 Full Article View Template Wide View"

Using a Responsive Template

Use a responsive Content Presenter display template if you want the layout of your content to change depending on the size of the browser.

The following example shows how to use one of the built-in responsive templates, but you can use any custom template.

The Articles View and Full Article View templates rely on the Site Studio RD_ARTICLE region definition, so Site Studio must be enabled in Content Server to seed the RD_ARTICLE region definition:

  1. Enable Site Studio on Oracle WebCenter Content Server (see Understanding Site Studio Integration).

  2. Start (or restart) Oracle WebCenter Portal after Site Studio has been enabled (this will seed the RD_ARTICLE region definition).

Note:

To create appropriate content for the Articles View template, see Creating or Editing Site Studio Content in the Content Presenter Configuration Dialog.

To use a responsive template:

  1. Add the Content Presenter task flow to a page.
  2. Select the content.

    See Selecting Content.

    The Content Source should be Single Content Item, Results of a Query, or List of Items.

    If the Content Source is Results of a Query, then set Content Type to WCM:RD:RD_ARTICLE to restrict the query to just content created using the RD_ARTICLE region definition. If the Content Source is Single Content Item, then choose content that is based on the RD_ARTICLE region definition. If the Content Source is List of Items, then ensure that the content items chosen are based on the RD_ARTICLE region definition.

  3. Select the display template.
    • If the Content Source is Single Content Item, select the Full Article View template.

    • If the Content Source is Results of a Query or List of Items:

      1. Set the Template Category to Site Studio Templates.

      2. Select the Articles View template.

If you use the Articles View or Full Article View template on a page and want to optimize the layout for a mobile device, you must use a page template with the correct viewport. For more information, see Optimizing Display on Mobile Devices.

Optimizing Display on Mobile Devices

If you use the Articles View or Full Article View template on a page and want to optimize the layout for a mobile device, you must use a page template with the correct viewport.

You can use either the Skyros Top Navigation (Mobile) page template, Skyros Side Navigation (Mobile) page template, or a custom page template with the viewport parameter.

To set the viewport parameter for a page template:

  1. Navigate to the Assets page for the portal.
  2. Click Page Templates.
  3. Select the page template.

    You cannot edit the out-of-the-box templates, but you can copy an out-of-the-box template and then edit the copy.

  4. From the Actions menu, select Edit Source.
  5. Click the Page Definition tab.
  6. Within the <parameters> section, add the following:
    <parameter id="viewport" value="width=device-width, initial-scale=1.0"/>
    

    Note:

    The value of the viewport parameter will be used as the value for the content attribute of the <meta name="viewport" content="..."/> tag, so if you set it the recommended value of "width=device-width, initial-scale=1.0" then the following meta tag will be added to the page:

    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  7. Click Save and Close.

Adding Links from Content to Navigation Nodes

You can include links to portal navigation nodes in your content to enable users to quickly navigate from a piece of content to another part of the portal.

When the content displays in Content Presenter at runtime, an end user can click the links to navigate to the desired portal navigation node.

You can create a link in the following content items:

  • a document of MIME type text/html (typically HTML files)

  • a Site Studio contributor data file (in a Rich Text element)

  • a Site Studio region template

To add a link to a node in the portal navigation from a content item:

  1. Edit the content item, either directly or as described in:
  2. Add a link using the following syntax:
    $wcUrl('externalId')
    

    where externalId is the value of the External ID property of the navigation node (see Setting Navigation Properties and Display Options for a Page.

    For example:

    <a target="" href="$wcUrl('NEWCUSTOMERSLINK')">New Customers</a>

Authoring Site Studio Content to Optimize Presentation in Content Presenter

Content Presenter integrates with Oracle Site Studio to allow you to create, access, edit, and display Site Studio contributor data files in a Content Presenter display template.

For more information, see Understanding Site Studio Integration

Tip:

Although Content Presenter also supports Site Studio region templates, it is recommended that you use Content Presenter display templates (that use region definitions) to integrate Site Studio and Oracle WebCenter Portal. Site Studio region templates display the details of the contributor data file rather than the contributed content. For more information, see Creating Content Presenter Display Templates in Developing for Oracle WebCenter Portal.

To optimize the presentation of Oracle Site Studio content in Content Presenter, follow the guidelines provided in the following sections:

Best Practices for Images

There are several guidelines to consider as you work with images in Site Studio contributor data files that will be displayed using Content Presenter.

  • Store images in Content Server in a common location.

  • Insert images into WYSIWYG elements using the Site Studio Contributor image wizard.

  • Set the src attribute of the image tag to a relative link to an image file in Content Server. This attribute is rewritten by Content Presenter during rendering to use the GET_FILE service.

  • For performance improvement, use web proxy to cache artifacts at URLs from Content Server, and set expiration based on tolerance for updates in Content Server.

    Example for Apache mod_cache:

    • CacheEnable mem /cs

    • CacheDefaultExpire 3600 (one hour)

  • If WebCenter Portal and WebCenter Content Server do not share a Single Sign-On login mechanism, images which are stored in WebCenter Content Server will be visible to the user only if the image is publicly available, or if the user is logged into WebCenter Content Server and has the correct permissions to view the image.

Best Practices for Defining Styles

There are several guidelines to consider as you work with style definitions in Site Studio contributor data files that will be displayed using Content Presenter.

  • Define styles in CSS files.

  • Store CSS files either in Content Server or in Oracle WebCenter Portal.

    • If stored in Content Server, add <link> in <head> of page template.

  • Load style class names into WYSIWYG region element definitions.

  • Select your CSS to format HTML in WYSIWYG elements.

  • For performance improvement, use web proxy to cache artifacts at URLs from Content Server, and set expiration based on tolerance for updates in Content Server.

    Example for Apache mod_cache:

    • CacheEnable mem /cs

    • CacheDefaultExpire 3600 (one hour)

Best Practices for JavaScript

There are several guidelines to consider as you work with JavaScript in Site Studio contributor data files that will be displayed using Content Presenter.

Recommended: Do not use JavaScript within web content that is rendered within Oracle WebCenter Portal.

If your web content uses JavaScript, follow these guidelines:

  • Add <link> in <head> of page template.

  • For performance improvement, use web proxy to cache artifacts at URLs from Content Server, and set expiration based on tolerance for updates in Content Server.

    Example for Apache mod_cache:

    • CacheEnable mem /cs

    • CacheDefaultExpire 3600 (one hour)

Creating or Editing Site Studio Content in the Content Presenter Configuration Dialog

You can create and edit Site Studio contributor data files from within the Content Presenter Configuration dialog.

To create or edit Oracle Site Studio content in a seamless interface within Oracle WebCenter Portal, WebCenter Portal must be connected to a Content Server repository, with the webContextRoot parameter set to the Content Server path, for example /cs.

For information on setting webContextRoot, see Registering Content Repositories in Administering Oracle WebCenter Portal.

To set webContextRoot through WLST, see createContentServerConnection and setContentServerConnection in WebCenter WLST Command Reference Reference.

Without this configuration, it is still possible to create or edit Site Studio content from within Content Presenter, but the create and edit actions launch new browser windows (or tabs) rather than opening within the Content Presenter task flow.

To create or edit Oracle Site Studio content in the Content Presenter Configuration dialog:

  1. Open the Content Presenter Configuration dialog.
  2. Click Select Content or the Content tab.
  3. On the Content tab, click Create Web Content.

    Figure 33-18 Selecting the Content Source: Site Studio

    Description of Figure 33-18 follows
    Description of "Figure 33-18 Selecting the Content Source: Site Studio"

    Tip:

    The Create Web Content button displays only when the Content Source field displays Single Content Item and when at least one Content Server repository (11g or higher) has the Site Studio component installed.

    The Oracle Site Studio Choose Region Content pane opens.

    Figure 33-19 Adding Site Studio Content: Choose Region Content

    Description of Figure 33-19 follows
    Description of "Figure 33-19 Adding Site Studio Content: Choose Region Content"
  4. In the Choose Region Content pane, select a Site Studio region definition on which the content you want to create or edit is based.

    Note:

    • To create or edit Oracle Site Studio content, at least one region definition must have been previously created in the Site Studio application.

    • To create articles for the Articles View and Full Article View templates, select the Article (RD_ARTICLE) region definition. For more information, see Using Responsive Templates.

  5. Click Next.

    The Choose content file pane opens.

    Figure 33-20 Adding Site Studio Content: Choose Content File

    Description of Figure 33-20 follows
    Description of "Figure 33-20 Adding Site Studio Content: Choose Content File"
  6. In the Choose content file pane, select one of the following:
  7. Make note of the file name, then click Next.

    The Check-in Confirmation pane opens.

    Figure 33-23 Adding Site Studio Content: Check-in Confirmation

    Description of Figure 33-23 follows
    Description of "Figure 33-23 Adding Site Studio Content: Check-in Confirmation"
  8. In the Check-in Confirmation pane, select one of the following:
    • Edit content item now to open the Site Studio Contributor editor, where you can edit the content item as described in Editing Site Studio Files In-Context (beginning with Step 4).

      You start editing when you click Finish.

    • Exit without editing to make no changes to the file.

  9. Click Finish to return to the Content Presenter Configuration dialog.
    • If you have configured the webContextRoot parameter, as described in the note at the top of this section, the Site Studio contributor data file you selected is shown auto-selected in the Content Presenter Configuration dialog.

    • If webContextRoot parameter is not configured, you can now select the Site Studio contributor data file on the Content page.

  10. In the Content Presenter Configuration dialog, click Save.

Creating and Editing Files In-Context in a Content Presenter Task Flow

With appropriate permissions, end users can edit HTML and Site Studio content in-context in a Content Presenter task flow.

In-context editing refers to editing content directly in Oracle WebCenter Portal at runtime, where the editor opens in a separate window.

Note:

Users must have the Contribute Page Content portal-level permissions or the Contribute page-level permission on the portal or page containing the Content Presenter task flow, as well as being assigned a role with write permissions on Content Server. For more information, see Administering Security in a Portal and Managing Oracle WebCenter Portal Security in Administering Oracle WebCenter Portal.

The following sections describe how to perform in-context editing:

Editing Site Studio Files In-Context

With appropriate permissions, end users can edit Site Studio contributor data files in-context in a Content Presenter task flow.

To edit a Site Studio file in-context:

  1. In the floating toolbar, click Contribute.

    Tip:

    • By default, the floating toolbar appears in the top right of the page, but you can move it around on the page by using the handle on the left of the toolbar to drag it to the preferred location.

    • If you cannot see the floating toolbar or the Contribute option, you do not have permission to use contribution mode.

    • The keyboard shortcut to enter and exit contribution mode is Ctrl+Shift+C.

      You can change the key sequence to enter contribution mode. See Changing the Contribution Mode Key Sequence.

    The editable areas of the page are highlighted with a dashed border.

  2. Click the Edit icon in the upper right corner of the document chrome (Figure 33-24).

    Figure 33-24 In-Context Edit Mode for a Site Studio File in a Content Presenter Task Flow

    In-context edit mode icon for Site Studio file
    The file is opened in Site Studio Contributor.
  3. In the Site Studio Contributor Data File editor, click a region to edit, as shown in Figure 33-25.

    For information about editing files in Site Studio Contributor, see the Oracle Site Studio documentation.

    Figure 33-25 Editing a File in Site Studio Contributor

    Description of Figure 33-25 follows
    Description of "Figure 33-25 Editing a File in Site Studio Contributor"
  4. Click Save and Close to exit the Site Studio Contributor editor and return to the portal.
  5. Click Save in the floating toolbar.

Creating New Site Studio Content In-Context

With appropriate permissions, users can create new web content in Site Studio during in-context editing in a Content Presenter task flow.

In-context creation of Site Studio files is slightly different than creating Site Studio files in the Content Presenter Configuration dialog, as described in Creating or Editing Site Studio Content in the Content Presenter Configuration Dialog. When creating a new Site Studio file in-context, you are limited to creating content that is of the same region definition, file location, security group, and document type as the content selected in the Content Presenter task flow. Additionally, the region definition must have been previously created in the Site Studio application.

To create a new Site Studio file in a Content Presenter task flow:

  1. In the floating toolbar, click Contribute.

    Tip:

    • By default, the floating toolbar appears in the top right of the page, but you can move it around on the page by using the handle on the left of the toolbar to drag it to the preferred location.

    • If you cannot see the floating toolbar or the Contribute option, you do not have permission to use contribution mode.

    • The keyboard shortcut to enter and exit contribution mode is Ctrl+Shift+C.

      You can change the key sequence to enter contribution mode. See Changing the Contribution Mode Key Sequence.

    The editable areas of the page are highlighted with a dashed border.

  2. Click the Create icon in the upper right corner of the document chrome (Figure 33-26).

    Figure 33-26 Create Icon for a Site Studio File in a Content Presenter Task Flow

    Create icon for a Site Studio file
  3. In the Choose Content window, select New Contributor data file, then click Next (Figure 33-27).

    Figure 33-27 Choose New Content File Window

    Description of Figure 33-27 follows
    Description of "Figure 33-27 Choose New Content File Window"
  4. Fill out the Check-in Content form.

    This form provides the metadata for the contributor data file and checks the file into Content Server. The file is empty until you (or another contributor) edits it. For more information on filling out this form, see Uploading and Checking In Documents in Using Oracle WebCenter Content.

  5. In the Check-in Confirmation window, select Edit content item now.
  6. Click Finish.

    The Site Studio Contributor Data File editor opens (Figure 33-28).

    Figure 33-28 Site Studio Contributor File Editor

    Description of Figure 33-28 follows
    Description of "Figure 33-28 Site Studio Contributor File Editor"
  7. Edit the file, then click Save and Close.
  8. Click Save in the floating toolbar.

Changing the Contribution Mode Key Sequence

You can change the key sequence used to enter contribution mode.

To change the key sequence used to enter contribution mode:

  1. Open the adf-config.xml file.
  2. Find the content-contribution element.
  3. Change the key-sequence entry to the required key combination.
******** Content Contributor Mode adf-config.xml entries ***************
 
<page-editor-config xmlns="http://xmlns.oracle.com/adf/pageeditor/config"> 
       <content-contribution> 
         <enabled>true</enabled> 
         <key-sequence>ctrl shift C</key-sequence> 
       </content-contribution> 
</page-editor-config>

Working with Content Presenter Task Flow Properties

The Content Presenter task flow has associated properties, which users with sufficient privileges can access.

The following sections provide information about properties of the Content Presenter task flow and describe the task flow parameters.

Setting Content Presenter Task Flow Properties

The View Actions menu in the toolbar of the Content Presenter task flow in the page editor provides access to the properties dialogs: Parameters, Access, Display Options, Style, and Content Style.

Note:

The Content Presenter properties are intended for use by advanced users who want to bind a parameter to an EL expression. If you modify a property value in the properties dialogs, the new value overrides the value specified in the Content Presenter Configuration dialog, and that value becomes read-only in the Content Presenter Configuration dialog (Figure 33-29).

Figure 33-29 Read-Only Property Value in Content Presenter Configuration Dialog

Description of Figure 33-29 follows
Description of "Figure 33-29 Read-Only Property Value in Content Presenter Configuration Dialog"

To set Content Presenter task flow component properties:

  1. Open the page in the page editor.
  2. In the component toolbar, click the View Actions menu and select the properties you want to set:

    Figure 33-30 Component Toolbar: View Actions Menu

    Component Toolbar: View Actions Menu
    • Parameters control the default task flow content. For descriptions of each parameter, see Content Presenter Task Flow Parameters. Parameters can be wired to events, and can be used facilitate the wiring of the task flow to page parameters and page definition variables. For more information, see Wiring Pages and Components.

    • Access settings show or hide the component to specific roles, users, or groups. For more information, see Setting Component Access.

    • The Display Options, Style, and Content Style properties affect the appearance and behavior of the task flow for all users. These properties are common to all task flows. For more information, see Modifying Component Properties.

    The Parameters and Display Options dialogs provide access to an Expression Language (EL) editor, which you can use to select or specify a variable value instead of a constant value. Click the Advanced edit options icon icon next to a property, then select Expression Builder to open the editor.

    Note:

    When you enter EL in the Display Options dialog, the parser reports an error only if it detects invalid syntax, such as a missing closing bracket. Validation is performed only on syntax, not on the expression value. Generic Display Options are those cataloged in Table 10-1.

    EL validation is not performed on non-generic display options.

    If you need EL assistance, an application developer can provide an EL expression; see Expression Language Expressions in Developing for Oracle WebCenter Portal.

  3. Save your changes.

Content Presenter Task Flow Parameters

There are several parameters that are unique to the Content Presenter task flow.

Table 33-1 describes the Content Presenter task flow parameters.

Table 33-1 Content Presenter Task Flow Parameters

Parameter Description

Data Source

The data source of the content. The value depends on the value of Data Source Type:

  • When Data Source Type is Single Node, set Data Source to a single node identifier in the format: connection_name#dDocName:content_id

    For example: myconnection.myco.com#dDocName:STAN_IDC-007619

  • When Data Source Type is Folder Contents, set Data Source to a single node identifier in the format: connection_name#dCollectionID:collection_id

    For example: myconnection.myco.com#dCollectionID:45535

  • When Data Source Type is Query Expression, set Data Source to a CMIS (Content Management Interoperability Services) query expression.

    Notes:

    • Using a CMIS query as the Data Source requires a valid Task Flow Instance ID.

      Examples:

      select * from cmis:document where cmis:name like 'test%'

      connectionName=connection_name#select * from cmis:document where cmis:createdBy = 'weblogic'

    • If connectionName is not specified, then the primary connection will be used.

      For more information about how to format the query and examples, see Content Management REST API in Developing for Oracle WebCenter Portal.

Data Source (cont)
  • When Data Source Type is Multi Node, set Data Source to a set of comma-delimited node identifiers in the format:

    connection_name#dDocName:content_id, connection_name#dDocName:content_id,...

    For example: myconn#dDocName:DOCUMENT_ID_12345,myconn#dDocName:DOCUMENT_ID_56789

where:

  • connection_name is the name of the content repository connection.

    Note: While WebCenter Portal allows specifying a different Content Server connection, iFraming is supported only for the default Content Server connection. Therefore, you cannot specify a non-default Content Server connection if the Content Presenter task flow will use iFrames to display content.

  • content_id is the Content ID for the content specified on the content information page for the item in Content Server, or the CollectionIDvalue on the content server.

  • collection_id is the dCollectionIDfound in the URL for the folder information page in Content Server.

Data Source Type

The data source type of the content. Corresponds to the Content Source value in the Content Presenter Configuration dialog. Valid values are:

  • Single Node: A single content item.

  • Folder Contents: The contents of a folder.

  • Query Expression: The results of a query.

  • Multi Node: An ordered list of content items.

Maximum Results

The maximum number of results to display when Data Source Type is Query Expression.

Default: 100

Region Template

Specifies whether the display template is a Site Studio region definition template. This value is valid only with Content Server 11g or higher:

  • ${true}: Display template is a Site Studio region definition template. The TemplateView ID value is set to the Content ID of the region template.

  • ${false} (default): Display template is not a Site Studio region definition template.

For information about creating and using Site Studio region templates, see Understanding Site Studio Integration and the Oracle WebCenter Content documentation library (http://docs.oracle.com/cd/E28280_01/webcontent.htm).

Task Flow Instance ID

The unique identifier of this task flow instance, used internally to maintain the association of the task flow instance with its customization and personalization settings. Do not edit this value.

Note: Using a CMIS query as the Data Source requires a valid Task Flow Instance ID.

Template Category ID

The display template category ID to use in rendering results for multiple content items. This ID may reference the default template category for an out-of-the-box display template (Table 19-2) or a custom category created for a display template for multiple content items (see Creating a Content Presenter Display Template in Developing for Oracle WebCenter Portal).

Template View ID

The display template view ID to use in rendering results for single content items. Enter the view ID of a template that is configured in the Assets or Shared Assets page for a specific content type, or for list-based templates by category ID. This ID may reference one of the out-of-the-box display templates (Table 19-1), a custom display template (see Creating a Content Presenter Display Template in Developing for Oracle WebCenter Portal), or set to the contentID of a region template if the content is a region.