Skip Headers
Oracle® Universal Content Management
10g Release 4 (10.1.4)
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next

Adding, Editing, and Deleting Fragment Assets

Assets are the files that are referenced from within a fragment, specifically from within a snippet in the fragment. A graphic, a cascading style sheet, and a standalone JavaScript file (see first note below for implementing ASP or JSP) are all frequently used assets. When you add an asset to a fragment, it becomes a part of the fragment and is managed in a fragment library in the content server. If you move or make a copy of a fragment, all of its assets are included.

You can add, edit, and remove fragment assets in the Fragment Assets dialog in the Fragment Editor.

Adding an Asset

To add an asset, perform these tasks:

  1. With the fragment open in the Fragment Editor, click Assets.

    This opens the Fragment Assets dialog (see Fragment Assets Dialog).

    Fragment Assets Dialog

    Fragment Assets Dialog
  2. To create a subfolder for the asset (this is optional), click Add Folder, type a name for the folder, and then press Enter on your keyboard.

    By default, Site Studio creates an asset folder based on the fragment's ID (see Specifying Fragment Properties). The folder name uses all lowercase letters to ensure that the fragment works on all platforms (specifically, UNIX). If you create any subfolders, you should use all lowercase letters as well. In addition, you should use only ASCII characters (see note below).

  3. Highlight the folder that you would like to add the asset to and then click Add Asset (the root, or top-level folder, is the default location for assets).

  4. Browse to the file on your file system and then click Open in the Windows dialog.

  5. Click OK to close the Fragment Assets dialog and return to the Fragment Editor.

When you save your fragment, the asset is packaged with the fragment and stored in the fragment library on the content server. You can now refer to the asset from each snippet in the fragment.

Editing an Asset

To edit an asset, perform these tasks:

  1. With the fragment open in the Fragment Editor, click Assets.

  2. In the Fragment Assets dialog, select the asset and then click Edit to open the two edit options.

    Edit Options in Fragment Assets Dialog

    Edit Options in Fragment Assets Dialog
    • Click Edit to open the asset in the default application associated with that file type (for example, a cascading style sheet may open in Notepad).

    • Click Edit with to open the Edit With dialog where you can use a different application to edit the file.

  3. Make your changes to the asset and then close the application used to edit the asset.

  4. Click OK to close the Fragment Assets dialog and return to the Fragment Editor.

Deleting an Asset

To delete an asset, perform these tasks:

  1. With the fragment open in the Fragment Editor, click Assets.

  2. In the Fragment Assets dialog, select the asset and then click Delete.

  3. Click OK to close the Fragment Assets dialog and return to the Fragment Editor.

Only ASCII characters should be used for fragment IDs and the names of asset files and folders. This is because the folder within the zip file, which is created automatically for the assets, is named after the fragment ID, and the zip format does not support extended characters. This is true also for the names of any folders used for the assets and for the names of the asset files themselves.

Rather than edit a cascading style sheet (CSS) asset that is already included in a fragment, you can just as well change the CSS declarations in the fragment snippet to reference your own cascading style sheet.

We recommend that you use the same name for your text-based assets (cascading style sheets, JavaScript files, and so on) as you are using for the fragment ID (see Specifying Fragment Properties). For example, if the fragment ID is "myfragment," then you should use the names "myfragment.css," "myfragment.js," and so on. Not only does this help you easily identify the files associated with a fragment, but if you ever create a fragment based on this one (using the "Copy and Edit" feature), all of the assets and code within them are updated to reflect the fragment name. As such, the assets seamlessly work with the fragment.


Note:

If you plan to write your fragments in JSP or ASP, you should place your code in a fragment asset and then reference that code from an inline fragment snippet.