Styling Pages

In this section:

A number of tools in WebFOCUS Designer support your efforts to apply styling to pages and page components. You can resize content, hide content from smaller devices if it interferes with a responsive layout, edit page, section and container properties, apply filters, themes and styles, and create custom templates.

Working With Content Containers

When you add content to a page, it is automatically placed in a container. To move and resize the content item, move and resize the container into which it was placed by dragging the container or its resizing handles. You can also configure and style a container by selecting it on the page and then using the options on the Settings and Format tabs of the Properties panel. Note that the options for a container are separate from those for the content item inside the container. To select the container, click the container toolbar, or select a container from the Outline tab of the sidebar. Empty containers can be added to the page by selecting the Container tab on the sidebar and dragging the selected container type into the canvas. A highlighted area shows where the container will be placed.

There are several types of containers. The default container for a single item is a panel container. The panel container is a basic container type that includes a title bar and toolbar with a run-time menu, as shown in the following image.


panel container with chart

The run-time menu provides the ability to refresh the content in the container by default. If the content currently visible in the container uses the AHTML output format, additional In-Document Analytic run-time options are added to this menu. For more information about In-Document Analytics, see Overview of In-Document Analytics. You can also add custom options to the run-time menu and to the container toolbar using embedded JavaScript. For more information, see Enhancing Pages With Custom JavaScript.

To add multiple items, such as charts, reports, and images, to a single container, use the tab, carousel, or accordion container types. These container types include the same features as the panel container, as well as controls to navigate between multiple content items. You can add another content item to a container by selecting the Content tab on the sidebar, navigating to an item, and dragging it onto the existing container. You are given options to add the new item to a new tab, panel, or slide, or replace the visible, existing item in the container.

In a tab container, navigate between items using the tabs below the title bar. You can double-click the text in a tab to change it, and right-click a tab to delete, duplicate, or reorder it. A tab container is shown in the following image.

Tab container with chart and report

A carousel container allows you to switch between content items by clicking a dot at the bottom of the container, or by clicking arrows that appear when you point to the left or right side of the container. When creating a page, right-click a carousel container to duplicate, reorder, or delete a slide. You can set a carousel container to automatically cycle between content items using the options described in Automatically Advancing Slides in a Carousel Container. A carousel container, with navigation arrows, is shown in the following image.


Carousel container with chart

Accordion containers place content in collapsible panels. You can expand and collapse items in an accordion container by clicking a panel label. When creating a page, right-click an individual panel in an accordion container to rename, reorder, duplicate, or delete the panel. An accordion container is shown in the following image.


Accordion container with chart

Other types of containers serve more specific purposes. The grid container type, only available in pages assembled from existing content, can be used as a filter container, as an alternative or in addition to the filter toolbar. Once you add filter controls from you content to a page, you can drag them from the default location in the filter toolbar into the grid control. Select the filter bar within the panel from the outline, and then select the Format tab to change the number of columns in the grid container. You can also drag a text label or submit button to the grid from the Control tab on the sidebar.

You can use a panel group container to keep a set of vertically arranged panels together when responsive folding occurs as the size of the page changes. To use a panel grid container, add it to the page, then drag new containers, content items, or fields into it. For more information, see Adding Panels to a Responsive Container.

A link tile container allows you to display a content item or image on a page that can be clicked to access additional, outside content. Drag the link tile container onto the page, then, from the Settings tab, use the link tile Background, Content, Attach all parameters, and Target properties, to set the displayed and target content, and configure how the link tile behaves. For more information, see Linking to External Content From a Page.

You can use the Explorer widget to provide access to the Workspaces view of the WebFOCUS Hub or WebFOCUS Home Page. This allows anyone accessing the page, or a portal containing the page, to open and run content items and create new content, depending on their privileges. In the Explorer widget, you can navigate through workspaces, folders, and content items from the Resources tree and Content area, and create new content using options in the +Content menu. For more information, see Providing Access to Content Items and ibi WebFOCUS Tools.

Right-click any type of container to access a shortcut menu of options. These include the ability to refresh the container content, change the title of the container, access the Settings or Format tabs, duplicate the visible content item, change the container type, or delete the container. If you select multiple containers, you also have the option to combine them into a tab, accordion, or carousel container.

Resizing Content on a Page

You can resize content on a page, at any time, using the sizing handles and the shaded placement area that appear on the canvas. When you hover over a container on the canvas, a series of handles appear. Drag a handle in the direction that you want to resize the item, as shown in the following image.

The content container snaps to the nearest row and column when you resize it. To change the number of columns in a section on the page, allowing more granular container widths, select a section, open the Format tab, and select an option from the Number of Columns area. 12 is the default. You can also change the amount of space between containers by selecting the entire page and typing a size for the Margin property, on the Format tab.

Editing Page, Section, and Container Properties

The Properties panel displays the properties for the element that is selected. To access container properties, select a container from the canvas or outline. To access section properties, click the grid inside the canvas, or select a section from the outline. To access page properties, click the page header or the toolbar, or select a page from the outline. If the page header and the toolbar are hidden, you can also access page properties by clicking the canvas outside a grid section.

The following properties are available when you select an entire page.

Settings tab:

Format tab:

The following properties are available for sections.

Settings tab:

Format tab:

The following properties are available for containers.

Settings tab:

Format tab:

The following options are available for content items in a page assembled from existing content. New content items in a page provide standard content creation options, in addition to these.

Settings tab:

Format tab:

Hiding Content From Devices

How to:

You can choose to hide certain content items from smaller devices, especially when dealing with large or multi-faceted items like maps or HTML pages. When an item is hidden from a device, the other items around it re-flow into the empty space and retain the responsive layout.

Procedure: How to Hide a Content Item From Devices

  1. In WebFOCUS Designer, select a large item that you want to hide from small-screen devices.
  2. On the Properties panel, on the Settings tab, under the Show On property, click a device icon to hide the selected item from this type of device.

    Note: All three device buttons are selected, by default, making the item visible on all devices. Manually clear the buttons to hide the item from specific device types.

    An example of hiding a large item from mobile phones and tablets is shown in the following image.

  3. Save the page.
  4. Run the page on a device, from which the item was hidden.

    The item does not display. All remaining content items rearrange to cover the empty space, as shown in the following image.

Automatically Advancing Slides in a Carousel Container

Using a carousel container is one way to put multiple charts, reports, and other content items into a single container. Carousel containers include an unobtrusive control that allows users to cycle through the items added to it, as shown in the following image.


carousel container

Unlike tabbed or accordion containers, carousel containers also include the option to autoplay the content within them, allowing you to show all of the content in the carousel container without requiring user interaction.

To enable autoplay for a carousel container, select the container and open the Settings tab on the Properties panel. The Autoplay interval and Rerun content properties are available in the Container Settings section. To enable autoplay, set the Autoplay interval to a value higher than zero (0) to enable autoplay. The Autoplay interval is the amount of time, in seconds, that each slide is shown before advancing to the next slide.

When the Autoplay interval is set, the Rerun content option becomes available. This option is turned off, by default. When enabled, the content on a slide of the carousel container refreshes each time it is displayed. When Rerun content is not enabled, the content on each slide only loads the first time it is displayed, and it is not refreshed unless manually prompted from the menu on the container toolbar.

Applying Themes and Styles to Pages

How to:

While customizing your page, you can apply themes and styles to various page elements. The general theme of the page is defined by the Theme setting, which you can configure in the Properties panel, on the page level. A theme affects the look of the entire set of elements on the page, including colors, opacity, and typeface styles. Themes also dictate the color schemes available as styles on the Format tab when editing sections, filters, or containers.

By default, the theme selected for a page is passed on to content in the page. You can select content items inside a container and change the theme for each one individually from the Format tab. If the content item was added to the page from the Content tab, you can additionally choose to use the original theme of the content item, instead of inheriting the page theme or selecting a specific theme to use.

There are four themes that WebFOCUS Designer offers:

To add a theme to this list, create a folder in the Global Resources area, in the Custom folder within the Themes folder. In that folder, you can add a custom StyleSheet to use with charts and reports, and a custom CSS file to use for pages. The .sty file and .css file must both be named themes.

Note: To facilitate the creation of a custom theme, you can copy and modify properties from one of the themes included with WebFOCUS. This makes it easy to identify the default classes used in a WebFOCUS Designer page.

Once you select a theme, you can further modify it by configuring styles. You can also save your unique combination of a theme and styles as a custom theme.

Procedure: How to Apply a Theme to a Page

  1. In WebFOCUS Designer, click the page toolbar to select the entire page, and then click the Format tab on the Properties panel.

    The style properties appear.

  2. In the Page Style section, from the Theme property drop-down list, select the theme that you want to use.

    The page refreshes with the new theme.

  3. Save your changes.

Procedure: How to Apply Styles to Sections

  1. In WebFOCUS Designer, select a page section by clicking the background area near a container, or by selecting a section from the outline.
  2. On the Properties panel, click the Format tab.

    The Style properties appear.

  3. Click a style that you want to use.

    Note: Styles are based on classes in the selected theme. For example, use the class .pd-style-default-color to configure the Default style of the theme, use the class .pd-style-color2 to configure Style 2 of the theme, and use the class .pd-style-color3 to configure Style 3 of the theme.

    The page refreshes and applies the style to the section, as shown in the following image, where the selection of Style 2 has made the first section blue.

  4. Optionally, add more sections and apply styles to them.
  5. Click the new section and apply a style to it, as described in step 3.

    The page refreshes and applies the new style. You can apply different styles to different sections, as shown in the following image.

    Example of different styles applied to sections on a page
  6. Save your changes.

Procedure: How to Apply Styles to Containers

  1. In WebFOCUS Designer, create a visualization with multiple containers.
  2. Click a container, and, on the Properties panel, click the Format tab.

    The Style properties appear.

  3. Click a style that you want to use.

    Note: Styles are based on classes in the selected theme. For example, use the class .pd-style-default-color to configure the Default style of the theme, use the class .pd-style-color2 to configure Style 2 of the theme, and use the class .pd-style-color3 to configure Style 3 of the theme.

    The page refreshes and applies the style to the container, as shown in the following image.

    Container with styling
  4. Optionally apply styles to other containers on the canvas.

    Note: When creating a visualization from existing content, to apply the same style to multiple containers, multi-select containers by holding the Ctrl key, and then click a style button.

  5. Save your changes.

Procedure: How to Create a Custom Theme

  1. Sign in to WebFOCUS as an administrator.
  2. On the Hub or Home Page, click Workspaces and, from the Resources tree, expand the Global Resources folder, and then expand the Themes folder.
  3. Open the Custom folder, and then click the New folder bottom above the Resources tree.

    The New Folder dialog box opens.

  4. Populate the Title field with the name of your custom theme, and click OK.

    The custom theme folder is created. Your theme CSS file will reside in this folder. If you know which CSS classes should be used for your theme, you can create a new CSS text file, add your code, and save it with the name theme. The file must be called theme to be available for selection in WebFOCUS Designer. To facilitate the process, you can modify an existing theme CSS file. In this example, we copy and modify the theme CSS file for the Light theme.

  5. Expand the Standard folder, and then expand the Light folder.
  6. Copy the theme CSS file, and paste it inside your new custom theme folder.

    The following image shows the correct hierarchy of the custom theme file.

    Global Resources folder heirarchy

    Note: Do not modify the name of the theme CSS file. It is imperative that both the CSS file and StyleSheet in your custom theme folder are called theme. The name of the folder in which the file resides is the theme name that is visible in WebFOCUS Designer.

  7. Right-click the newly copied theme CSS file, and then click Edit.

    The Text Editor window opens.

  8. Modify the code to achieve the desired look of the theme.

    In this example, you could change the background color from white #fff to yellow #ffff00.

  9. Save and close the Text Editor.
  10. Optionally, configure a related content theme by creating a StyleSheet (.sty) file called theme. You can copy this from an existing theme folder, such as the Light folder, as well.

    The styling properties in the StyleSheet will be applied automatically to content on the page when your custom theme is used, unless that content has a different theme explicitly assigned.

  11. In WebFOCUS Designer, apply the new custom theme to a page, as described in How to Apply a Theme to a Page.

    An example of a new theme applied to a page is shown in the following image.

    Example of theme applied to a page

    Notice that the content theme, or StyleSheet, associated with the page theme was automatically applied to the content on the page.

  12. Save your changes.