Applying a Style to a Region

11-28 Oracle Fusion Middleware Users Guide for Oracle Portal

5. Click the Main tab to bring it forward.

The attributes available on the Main tab vary a little from the attributes available when you first create the style. Notably, the Main tab includes Name and Description attributes. The Name attribute differs from the Display Name attribute both in the way Oracle Portal uses it and in the rules that govern which characters can be used in its formation. Oracle Portal uses the Name internally. The default value in the Name field is taken from the Display Name provided when the style was created. The value is truncated to 65 characters and any spaces and special characters are discarded. Use only alphanumeric characters A to Z, a to z, and 0 to 9 and underscore _ For example, if the Display Name is RD Style, the Name is RDSTYLE. The Name must be unique within its page group and the Shared Objects page group. Use up to 65 characters.

6. If you wish, enter a description of the style in the Description field.

The style description is available to view when users edit the style. It is not exposed anywhere else.

7. Click the Properties tab to bring it forward.

Edit the style properties as described in the previous sections, including: ■ Section 11.3, Style Element Properties ■ Section 11.4, Defining Styles for Items ■ Section 11.5, Defining Styles for Portlets ■ Section 11.6, Defining Styles for Tabs ■ Section 11.7, Defining Common Style Elements

8. Click the Main tab to bring it forward, then click the Clear Cache link.

Clearing cache removes all cache entries associated with this style, making the changes you have made take effect immediately.

9. Click OK when you are done.

11.11 Deleting a Style

When you delete a style, all pages and item regions that used the style revert to the page group default style. If the page group default style is None, all pages and regions revert to the system default style. You cannot delete the system default style, nor can you delete the style created automatically when a page group is created. To delete a style, you must either have created the style or have at least the page group privilege Manage Styles on the page group that owns the style. To delete a style: Note: If the style is not included in those listed in the Page Groups portlet, click the More… link that displays at the end of the list of styles. Working with Colors and Fonts 11-29 1. Log in to Oracle Portal.

2. Click the Build tab to bring it forward.

3. From the Page Groups portlet Work In drop-down list, select the page group that

owns the style to be deleted. By default, the Page Groups portlet is located on the Build tab of the Portal Builder page.

4. In the Layout Appearance section, click the Browse link next to the Styles

heading. The Portal Navigator opens, displaying a list of the selected page group’s styles.

5. Click the Delete link next to the style to be deleted.

6. In the confirmation page, click Yes.

7. Optionally, click the Builder link at the top of the page to return to the Page

Groups portlet.

11.12 Using Portal Style Element Classes in HTML Templates and CSSs

In Oracle Portal, there are three typical style scenarios: ■ Use styles you create through the portal’s user interface. ■ Augment portal styles through a combination of Oracle Portal style element classes plus your customizations of them. ■ Provide your own custom cascading style sheet CSS. This section deals briefly with the second scenario: augmenting portal style element classes. You may prefer to create custom style sheets using Oracle Portal style element classes in a CSS or embedded between stylestyle tags in a portal HTML template. For example, the standard style element class for a portlet header contains a parameter for background color but not for background image: .PortletHeaderColor{Background-Color:336699;} You can augment the existing class by adding a background image parameter: .PortletHeaderColor{Background-Color:336699; Background-Image:urlhttps:company.us.myco.com:5555imagesFFFFFFr.gif;} By customizing Oracle Portal style element classes, you can reduce the amount of coding by simply altering these existing classes. To ensure that you use the appropriate style classes in your CSS or between your stylestyle tags: Tip: If the style is used by more than one page group, it will be in the Shared Objects page group. Note: When you augment Oracle Portal style element classes with additional parameters, you can no longer use the Oracle Portal declarative interface to maintain the style classes. You must maintain the classes yourself in the HTML or the referenced CSS file. 11-30 Oracle Fusion Middleware Users Guide for Oracle Portal ■ Set all the pages that will use Oracle Portal style element classes to Main style. Many of Oracle Portal’s style element classes use the variables idn and siteidnn. The idn variable refers to the identity of the style being used. The siteidnn variable refers to the page group that owns the style. With the Main style, which is owned by the Shared Objects page group, the values of these variables are fixed—and therefore predictable: id1siteid0. One way to ensure that all new pages in a page group use the Main style is to set Main as the page group’s default style, then select the page group configuration option Use Default Properties When Creating Page. For information on setting this option, see Section 4.5.2, Specifying Inheritance Rules for Newly Created Pages . For information on selecting a default style for a page group, see Section 4.5.3, Choosing a Default Style for a Page Group . For information on selecting a style for a page, see Section 11.8, Applying a Style . You may want to take the further step of prohibiting users from changing page styles. To do this, edit the relevant page group’s properties, deselecting Allow Privileged Users To Manage Page Style . For more information, see Section 4.3.2, Controlling Who Can Apply a Different Style to a Page . ■ Create a CSS that includes Oracle Portal style element classes, which you can define according to your own style specifications. Or embed Oracle Portal style element classes in your HTML template see next bullet. For a list and description of Oracle Portal style element classes, see Section E.2, Style Element Classes Used with Oracle Portal Styles . ■ Create an HTML template that calls the CSS or that includes Oracle Portal style element classes. In the template, do not use the page.style tag. The page.style tag includes Oracle Portal style element classes in the template. This could result in conflict caused by two classes having the same name. For information on creating HTML templates, see Chapter 12, Providing a Standard Look and Feel . ■ Apply the HTML template to your portal pages. For information on applying HTML templates, see Chapter 12, Providing a Standard Look and Feel .

11.13 Troubleshooting Styles

When I create a page, I am not given the option to select a style for the page. If the page is based on a Portal Template that does not allow privileged users to choose their own page style, the style selection screen does not display when you create a page, and the Style tab does not display when you edit a page. If you have sufficient access to the template, you can edit the template and select Enable Pages To Use Different Style on the Style tab of template properties. Once this setting is selected, the Style tab displays in page properties. Another possibility is that the page group that owns the page is not configured to allow privileged users to manage a page style. This option is available on the Main tab of page group properties. It must be selected for users to select a style for any pages in the page group. How do I control the appearance of hyperlinks in, for example, text items? The Plain and None selections provide the same effect for most item types. However, when applied to items displayed as hyperlinks, they behave differently: