Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle WebCenter Spaces
11g Release 1 (11.1.1.5.0)

Part Number E10149-09
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

12 Working with Page Templates

Out-of-the-box, WebCenter Spaces is pre-configured with a range of page templates that users can apply to Spaces and pages. Portal designers can change out-of-the-box page templates and create brand new ones to achieve a look, feel, and layout that suits their organization.

This chapter describes how to create, edit, and apply page templates in WebCenter Spaces. It contains the following sections:

Portal designers with advanced layout requirements can use development tools, such as JDeveloper, to build page templates and upload them to WebCenter Spaces.

For generic information about adding and editing different types of resources, see Chapter 10, "Working with the Resources that Compose a Portal or Community."

Audience

This chapter is intended for portal designers with the application permission Application-Page Templates-Create, Edit, and Delete.

To build page templates for a particular Space, you need the permission Space-Resources-Create, Edit, and Delete Resources (standard permission model) or Space-Page Templates-Create, Edit, and Delete Page Templates (advanced permission model).

See Also:

For information about roles and permissions, see Chapter 20, "Understanding WebCenter Spaces Security."

12.1 What You Should Know About Page Templates

In WebCenter Spaces, page templates define how individual pages and groups of pages display on a user's screen. When you use page templates to display pages, the pages are always consistent in structure and layout across the application.

A typical page template, shown below, defines the following:

  1. Header on top of the page

  2. Navigation structure at the top of the page, or in a sidebar, to link to important targets

  3. Page content area

  4. Footer at the bottom of the page

Everything that surrounds the "page content" area is referred to as the page template.

Figure 12-1 Page Template - Basic Structure

Page Template
Description of "Figure 12-1 Page Template - Basic Structure"

Just like other WebCenter Spaces resources, portal designers can build page templates that are available to the whole application (application-level resources) and page templates that are scoped to a particular Space (Space-level resources).

Note:

If you create a page template at the Space level, the template is available only to that Space and not to any Subspaces beneath it. To make a page template available to a Space and all its Subspaces, the template must be created at the application level.

12.1.1 Out-of-the-Box Page Templates

WebCenter Spaces provides several out-of-the-box page templates:

  • Fusion Side Navigation

    The navigation panel is on the left side of the page. The main content area is stretched to fill all the available space.

  • Fusion Top Navigation

    The navigation panel is above the main content area. The main content area is stretched to fill all the available space.

  • WebCenter Public-Pages Template

    The default page template for WebCenter Spaces public pages.

  • WebCenter Spaces Side Navigation

    The navigation panel is on the left side of the page. The size of every component in the main content area is calculated based on the size of its children.

  • WebCenter Spaces Top Navigation

    The navigation panel is above the main content area. The size of every component in the main content area is calculated based on the size of its children.

You cannot directly edit or customize any of the out-of-the-box page templates listed here. If you want to exclude or display different content within one of these page templates, you must make a copy of the template, and then make changes to your copy rather than the original version.

12.2 Creating a Page Template

When you create a page template, you use an existing page template as the starting point for the new page template.

To create a page template:

  1. Navigate to the Resources page of your application or the Space in which you want to create the page template, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, under Structure, select Page Templates.

  3. On the menu bar, click Create.

  4. In the Create New Page Template dialog, in the Name field, enter a name for the page template.

    Figure 12-2 The Create New Page Template Dialog

    Description of Figure 12-2 follows
    Description of "Figure 12-2 The Create New Page Template Dialog"

  5. In the Description field, enter a description for the page template.

    The description is displayed below the name in the Resources page and as a tool tip when selecting a page template. You should ensure that the description helps page designers determine if they want to use this particular page template.

  6. From the Copy from dropdown list, select an existing page template to use as the starting point for your new page template.

    Tip:

    You can also create a copy of an existing page template by selecting the existing page template on the Resources page, clicking Edit and then Copy on the menu bar, and providing a name and description for the new page template.
  7. Click Create.

    The newly created page template is listed on the Resources page. The gray circle icon next to the page template indicates that it is not yet published and hence is not available to other users. For information about publishing a page template, see Section 10.4.3, "Showing and Hiding Resources."

12.3 Editing a Page Template

When you create a new page template, you copy an existing page template. To turn this copy into the page template that you want, you must edit it by using Oracle Composer or by editing the source code to change the layout and content of the page template as desired.

This section includes the following subsections:

12.3.1 Editing a Page Template in Oracle Composer

The most common way of editing a page template is to use Oracle Composer.

To edit a page template in Oracle Composer:

  1. Navigate to the Resources page of your application or the Space that contains the page template that you want to edit, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, under Structure, select Page Templates.

  3. In the main panel, select the page template that you want to edit.

  4. From the Edit menu, choose Edit.

    This opens the page template in Oracle Composer where you can edit its layout and content.

  5. Within Oracle Composer, choose whether to work in Design view or Source view:

    • Design view provides a WYSIWYG rendering of the page template, where controls are directly selectable on each component.

    • Source view provides a combined WYSIWYG and hierarchical rendering of page template components, where controls are available on the header of the hierarchical list. You can specify whether to present the page template source on the top, bottom, left, or right of the WYSIWYG portion of the page template.

  6. Your page template must include at least one content region. You can create new content regions in the page template by clicking one of the Add Box icons in an existing region. This process is very similar to adding content regions to a page. For more information, see Section 17.3.5.4, "Adding New Content Regions."

  7. Aside from the main content area, the other main feature of a page template is the navigation area. The navigation area of a page provides access to the rest of the portal. WebCenter Spaces provides several task flows for providing navigation within your portal, you can add these task flows anywhere within the page template. For more information, see Section 11.3.1, "Adding Built-in Navigation Task Flows to Page Templates."

    If these task flows do not quite meet your requirements for navigation, you must develop your page template further in JDeveloper. You can create the main structure for your page template in WebCenter Spaces and then download it for importing into JDeveloper, or you can create the page template entirely in JDeveloper and then upload it into WebCenter Spaces. For more information, see Section 12.8, "Using JDeveloper to Build Your Page Templates."

  8. You can add content to a page template by adding components from the Resource Catalog. The catalog is a gateway to a wide range of task flows, portlets, layout components, and other types of resources.

    Authorized users can create custom Resource Catalogs and add any variety of the available resources. This means the content of a given Resource Catalog is dependent on the person who designed the catalog. In addition, the Resource Catalog available to application-level page templates may be different from that available for Space-level page templates. For more information about Resource Catalogs, including how to create custom Resource Catalogs and how to configure which Resource Catalog to use for page templates, see Chapter 16, "Working with Resource Catalogs."

    To add a component from the Resource Catalog, click the Add Content icon in the region to which you want to add the component. Again, the process is very similar to adding components to a page. For more information, see Section 17.5, "Adding Resource Catalog Components to Pages."

  9. WebCenter Spaces provides a range of reusable components that you can add to your page templates. You can customize attributes such as text, label, inlinestyle, and so on, to change the look and feel to suit your page template.

    Note:

    Oracle does not recommend that you modify values for attributes such as id, action, actionListener, destination, because these properties impact the functionality of the component.

    Table 12-1 lists all the WebCenter Spaces components that are available. For more information about each of these components, see Chapter 13, "Adding Spaces Components to Your Templates."

    Table 12-1 Reusable WebCenter Spaces Components

    A to Create Sp Create Su to I J to P R to U

    About Space

    Create Subspace

    Join Space

    RSS

    About WebCenter

    Current User Profile

    Leave Space

    Search

    Add to Favorites

    Edit Page

    Login

    Self Registration

    Administration

    Email Members

    Logout

    Share Resource

    Change Membership

    Email Space Moderators

    Manage Pages

    Spaces Switcher

    Contact Administration

    Favorites Menu

    Page Links

    Status Indicator

    Copyright Message

    Global Help

    Parent Space

    Subscription Preferences

    Create Page

    Home Space

    Print Preview

    Tags

    Create Space

    Invite People as Connection

    Privacy URL

    User Preferences


  10. When you have finished editing the page template, click Save and then Close.

12.3.2 Editing the Source Code of a Page Template

If you prefer working in source code, you can use the Edit Source option.

To edit the source code of a page template:

  1. Navigate to the Resources page of your application or the Space that contains the page template that you want to edit, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, under Structure, select Page Templates.

  3. In the main panel, select the page template that you want to edit.

  4. From the Edit menu, choose Edit Source.

    The Edit Source dialog (Figure 12-3) displays the source code of the page template.

    Figure 12-3 The Edit Source Dialog for a Page Template

    Description of Figure 12-3 follows
    Description of "Figure 12-3 The Edit Source Dialog for a Page Template"

  5. Edit the code as required.

    The XML syntax in the code is validated and an error message is displayed if you miss any tags or add them incorrectly. Validation is not performed for non-XML files.

    You might prefer to copy the code from the dialog and paste it into an editor of your choice, for example, JDeveloper, where further validation can be performed. After editing the code, you can then copy it and paste it back into the dialog.

    Note:

    To make more full use of JDeveloper's capabilities for editing page templates, you might prefer to download the page template from WebCenter Spaces and import it into JDeveloper for editing. For more information, see Section 12.8, "Using JDeveloper to Build Your Page Templates."
  6. Click OK.

12.4 Customizing a Page Template for a Space

Page templates created at the application level can also be used in Spaces. For example, a portal designer may create several corporate page templates for use in Spaces throughout the application. However, you may find that for a particular Space, the application-level page template does not quite work and needs a bit of fine tuning.

You could create a copy of the page template within your Space and make the changes you require. However, as soon as you create the copy, the new page template is completely separate from the original. Any changes made to the original template are not cascaded down to your copy.

Alternatively, within your Space you can customize the application-level page template. The customizations you make apply only to the Space in which you perform them. However, the connection to the original page template is retained, so any changes made at the application level are automatically cascaded down to the page template at the Space level.

To customize a page template:

  1. Navigate to the Resources page of the Space that contains the page template that you want to edit, as described in Section 10.1.4.2, "Accessing Space-Level Resources."

    Note:

    You can customize page templates only at the Space level. You cannot customize page templates at the application level.
  2. In the left navigation panel, under Structure, select Page Templates.

  3. In the main panel, select the page template that you want to customize.

  4. From the Edit menu, choose Customize.

  5. Customize the page template as required.

  6. When you have finished customizing the page template, click Save and then Close.

12.5 Managing a Page Template

This section includes the following subsections:

12.5.1 Showing and Hiding a Page Template

When you create a page template, by default it is hidden. A hidden page template is not available for use in the application, the Home Space, or any other Space. To make a page template available, it must be marked as shown. Further, for a page template created at the application level, you can control whether it is available to any, all, or selected Spaces in the application.

For generic information about hiding and showing resources, see Section 10.4.3, "Showing and Hiding Resources."

For generic information about resource availability in Spaces, see Section 10.4.2, "Setting Properties on a Resource."

12.5.2 Setting Properties on a Page Template

You can control a page template's display attributes and availability by setting the template's properties in the Edit Properties dialog. Setting page template properties follows the same procedure as any other resource. For more information, see Section 10.4.2, "Setting Properties on a Resource."

To view the properties associated with a page template, use the About menu option.

12.5.3 Setting Security on a Page Template

You can control whether all users or only specific users or groups can access the page template that you created in your application or Space. Setting access to a page template follows the same procedure as any other resource. For more information, see Section 10.4.4, "Setting Security for a Resource."

12.5.4 Copying a Page Template

You can make a copy of a page template by selecting it and choosing Copy from the Edit menu on the Resources - Page Templates page. Copying a page template follows the same procedure as any other resource. For the generic procedure, see Section 10.4.1, "Copying a Resource."

12.5.5 Deleting a Page Template

Provided you are assigned the required permissions, you can delete any custom page template. Deleting a page template follows the same procedure as deleting any other resource. For more information, see Section 10.4.5, "Deleting a Resource."

12.5.6 Previewing a Page Template

WebCenter Spaces provides a means of previewing a page template, so that you can see what it looks like while still within the Resources page, enabling you to make adjustments quickly, if required. Previewing a page template follows the same procedure as previewing other resources. For more information, see Section 10.4.6, "Previewing a Resource."

12.6 Applying a Page Template to a Space

When you create a Space, the Space inherits the page template defined for the Space template that you choose for the Space.

Note:

If the Space template does not specify that a particular page template must be used, the Space uses the default page template specified by the WebCenter Spaces administrator. See Section 5.8, "Choosing a Default Page Template."

If you are the Space moderator, or have Manage Configuration permission on a Space, you can optionally select a different page template for the Space. This overrides the Space template setting and the application setting. For more information, see Section 51.4.9, "Changing the Page Template for a Space."

12.7 Choosing the Page Template Resource Catalog

The Resource Catalog used by a page template determines which components can be added to the page template.

WebCenter Spaces provides a Default Page Template Catalog that includes the most commonly required components for page templates. Authorized users can create custom Resource Catalogs for use by page templates. For more information, see Chapter 16, "Working with Resource Catalogs."

By default, a Space uses the page template Resource Catalog set by the WebCenter Spaces administrator for all Spaces in the entire application. However, you can override this setting at the Space level.

12.8 Using JDeveloper to Build Your Page Templates

In the majority of cases, you are likely to want to create a page template that is beyond the editing capabilities of WebCenter Spaces. Specifically, to add more complex navigation UI than is available through the built-in navigation task flows, you will need to add the navigation UI programmatically. To do this, you have several options:

The steps to upload and download page templates from WebCenter Spaces are described in Section 10.5, "Using JDeveloper to Build WebCenter Spaces Resources."

Oracle WebCenter provides a special JDeveloper workspace (DesignWebCenterSpaces.jws) for developing WebCenter Spaces resources, such as page templates. The workspace offers a design environment in which to create and edit your page templates, and also enables you to upload your page templates to WebCenter Spaces for testing. For more information and to download the JDeveloper workspace, see the section "Developing WebCenter Spaces Resources" in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

As mentioned earlier, specifically for page template, you might find that the functionality for visualizing portal navigation provided within WebCenter Spaces is not complex enough for the navigation that you want to expose in your application. Using JDeveloper, you can visualize a much more complex navigation UI in your page template, using ADF navigation components and EL expressions. For more information, see the chapter "Visualizing Your Portal Navigation" in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.