4 Managing Fragment Libraries

Concepts

Tasks

4.1 About Fragment Libraries

A fragment can be a single line of text (perhaps one that states your company's copyright), or it can be a complex collection of scripts performing client-side and server-side actions (such as a JavaScript-based menu).

Fragments are compiled in libraries which can be made available to multiple Web sites. A fragment library must be located in the [CS-Dir]\weblayout\fragments directory to be available to your Web site. They are deployed to this location by default when you install Site Studio. However, if you manually check a fragment library into the content server, you must deploy it to this location.

4.2 Deploying a Fragment Library on the Server

If you have a fragment library that is checked into the content server but not deployed to the appropriate directory where it can be used by your site, then you can deploy your fragments in the Site Studio Administration section on the content server.

To deploy a fragment library on the server, perform these steps:

  1. Log in to the content server as an administrator.

  2. In the Administration section, select Site Studio Administration.

    The Site Studio Administration page is displayed (see "Site Studio Administration"). If you run Oracle Content Server in the Top Menus layout, you do not see this page. Instead, all administration options are then items in the Site Studio Administration menu.

  3. Click Manage Fragment Libraries.

    The Manage Fragment Libraries page is displayed (see "Manage Fragment Libraries Page").

  4. Select the fragment library to deploy.

  5. Click Deploy Fragment Library.

    The fragments are deployed to the [CS-Dir]\weblayout\fragments directory on the content server. After this is done, the page refreshes and the Deploy Fragment Library button is disabled again (until you select another library).

    As an alternate to performing these steps, you can use the Upload Fragment Library/Download Fragment Library feature in the Designer application. See the User's Guide for Site Studio Designer for more information.

4.3 Configuring JSP Fragments on the Server

If, after installing the Site Studio component, you add a group to the list of JSP-enabled groups in the content server, you must redeploy (extract) the JSP support files that enable Site Studio JSP fragments to work properly.

To configure JSP fragments on the server, perform these steps:

  1. Log in to the content server as an administrator.

  2. In the Administration section, select Site Studio Administration.

    The Site Studio Administration page is displayed (see "Site Studio Administration"). If you run Oracle Content Server in the Top Menus layout, you do not see this page. Instead, all administration options are then items in the Site Studio Administration menu.

  3. Click Manage Fragment Libraries.

    The Manage Fragment Libraries page is displayed (see "Manage Fragment Libraries Page").

  4. Click Configure JSP Support.

    The required support files are extracted to the appropriate location on the content server.

4.4 Compressing Contributor JavaScript

There is a lot of JavaScript used to help Contributor load and apply changes that contributors make to a Web site. The JavaScript can be compressed which can improve the performance of serving the Web site. This compression involves stripping out spaces and line breaks, as well as replacing long variable names with single letters. All JavaScript is then concatenated.

To compress the Contributor JavaScript, perform these steps:

  1. Log in to the content server as an administrator.

  2. In the Administration section, select Site Studio Administration.

    The Site Studio Administration page is displayed (see "Site Studio Administration"). If you run Oracle Content Server in the Top Menus layout, you do not see this page. Instead, all administration options are then items in the Site Studio Administration menu.

  3. Click Manage Fragment Libraries.

    The Manage Fragment Libraries page is displayed (see "Manage Fragment Libraries Page").

  4. Click Compress Contributor JavaScript.

    The JavaScript files are compressed and concatenated, then placed on the content server.