Creating a New Fragment Deleting a Fragment

Working With Fragments 13-9 5. On the Assign Info Form in the content server, enter the appropriate metadata for the library and then click Assign Info. It may occasionally be necessary to click the Refresh icon Figure 13–5 in Designer to see the most current list of fragments in the Toolbox which reads them from the content server. Figure 13–5 Refresh Icon In Site Studio, it is good practice to create a copy of a fragment and then edit that fragment instead of editing the original. There are several reasons for this: ■ You can quickly and easily revert to the original fragment if needed in case anything goes wrong with the fragment youre editing. ■ You can quickly get started with your own fragment without re-creating everything in an existing fragment much like creating a page template based on an existing page template. ■ You reduce the chances of overwriting another designers work and consequently, creating unpredictable results on a Web site. The reason for this is that the fragments you create and edit in Designer are stored in one place in the content server. They appear in every instance of Designer that is connected to the same content server, and therefore, multiple designers can end up using the same fragment on different Web sites.

13.9 Creating a New Fragment

In addition to editing fragments and creating fragments from existing ones see Editing Fragments on page 13-7, you can create a fragment from scratch and add your own content to it. This is a good choice to introduce functionality or use existing content from another Web site that wasnt created with Site Studio. To create a fragment, perform these tasks:

1. From the File menu, select Fragment, then select New.

2. In the New Fragment dialog, enter property values for the fragment see Properties for Fragment Dialog on page A-89.

3. Click OK to close the fragment properties dialog, which opens the Fragment

Editor. 4. In the Fragment Editor, add the desired snippets, assets, parameters, and elements if its a static list to the fragment. See Using the Fragment Editor on page 13-10 Note: When you edit a fragment in the Fragment Editor, the fragment library that the fragment is stored in is checked out of the content server, and it is checked back in when you close the Fragment Editor. It is also checked out and checked in each time you save the fragment. This prevents designers assuming your organization has more than one from encountering sharing violations or overriding each others work. 13-10 Oracle Fusion Middleware Users Guide for Site Studio Designer 5. When finished making changes, click the Save icon Figure 13–6 in the toolbar or click File then Save and follow the steps outlined in Saving a Fragment in a Fragment Library on page 13-23 Figure 13–6 Save Icon The fragment displays in the Toolbox with the other fragments and is available to every site on the content server.

13.10 Deleting a Fragment

You can delete a fragment from a template in the same way that you delete tables, graphics, and other objects. To delete a fragment, perform these tasks:

1. Select the fragment, and press the Delete key on your keyboard.

or In source view, right-click the fragment code and choose Delete Fragment Instance .

2. Click Yes to confirm the deletion.

The fragment instance is removed. The fragment itself remains in the Toolbox, and you can continue using it on other templates.

13.11 Deleting a Fragment in the Toolbox