9 Working With Definitions

The templates (page templates, subtemplates, region templates) are used to control how data is displayed. The definitions - placeholder definitions, region definitions, and element definitions - control which data is presented, and additionally control how the contributor interacts with the data.

This section covers the following topics:

9.1 About Definitions

When a definition is used, it then prescribes what can be contained in the asset the definition is associated with. Placeholder definitions specify which region templates, region definitions, and subtemplates can appear in a placeholder, region definitions specify which elements can appear in a region template, and element definitions control how the contributor can modify the data within the contributor data file.

This section covers the following topics:

9.1.1 About Placeholder Definitions

Placeholder definitions are what connect each placeholder to the content and other assets associated with that place holder to display. Since the placeholder is simply a marker on the page, the placeholder definition is used to determine whether a contributor can edit the content displayed within the placeholder, if they can view reports, and other actions.

Additionally, the placeholder definition includes the region definitions that can be used within the area of the placeholder (also called a contribution area), and these region definitions are then connected to one or more region templates that are also controlled in their availability by listing them in the placeholder definition.

A subtemplate, which is a section of HTML that may include multiple placeholders (and by association other placeholder definitions), can also be listed as available in the placeholder definition. A subtemplate can be used in the contribution region instead of a region definition and a region template.

The placeholder definition controls which region definitions are available within the placeholder. By including more region definitions in the placeholder definition, then you have more options to use the region definition as a method of controlling the data file assigned to the contribution region.

Templates, such as region templates, subtemplates, and page templates, are used to control how the associated data is displayed. Definitions, such as region definitions, placeholder definitions, and element definitions, control what data is displayed, and how the contributor interacts with that data.

For more information, see Section 9.8, "Working With Placeholder Definitions."

9.1.2 About Region Definitions

The typical region definition contains multiple elements, and various combinations of these elements are used on several different region templates. Each region definition contains a list of the elements available to place on the associated region template. This enables multiple region templates to access the same grouping of elements (but it does not have to be the same data file) and arrange them in different ways.

Because the region definitions limit the availability of elements in the contribution model, it is especially important to follow good naming conventions for region definitions. It is possible that you have more region definitions than any other site asset. A good naming convention helps you sort out which definitions are best suited for the different region templates you create without having to open multiple region definitions and see what exactly they do.

Since the creation of a region template requires you associate it with a region definition, it is recommended that you create region definitions first, then create region templates.

For more information, see Section A.42, "Region Definition Dialog," and Section 9.9, "Working With Region Definitions."

9.1.3 About Element Definitions

Elements are the objects used to define how the contributors can edit the data. The available elements are WYSIWYG (What You See Is What You Get), plain text, image only, static lists, and dynamic lists. You can also create custom elements that can be used for several situations, including processing data-driven site creation.

9.2 Creating a New Definition

To create a definition, perform these tasks:

  1. In the menu on the Site Assets pane, select the definition type.

  2. Click the Create New icon (Figure 9-1), select New, and then the definition type.

    The Assign Info Form opens for you to check the item into the content server.

    Figure 9-1 Create New Icon

    Create New icon
  3. Enter appropriate values for the Assign Info Form.

    For guidelines on naming Site Studio assets, see Section 4.2, "Naming Site Assets."

  4. When complete, click Assign Info.

  5. The definition is created.

9.3 Editing Definitions

Editing each definition uses different interfaces. Each interface maximizes the ease in making the changes specific to the type of definition you are working with.

This section includes the following topics:

9.3.1 Editing a Placeholder Definition

The placeholder definition should contain the region definitions, region templates, and subtemplates that would be used to control the content used in the contribution region.

To edit a placeholder definition, perform these tasks:

  1. In the menu on the Site Assets pane, select Placeholder Definitions.

  2. From the list, select the placeholder definition to be edited and click the Edit icon (Figure 9-2).

    The placeholder definition dialog opens. For more information, see Section A.72, "Placeholder Definition Dialog," and Section 9.8, "Working With Placeholder Definitions."

    Figure 9-2 Edit Icon

    Edit icon
  3. Enter a description for the placeholder definition. You should use a good naming convention for placeholder definitions. If you can understand what the placeholder definition does from the name, then you won't have to view the definition each time you consider using it.

  4. Select or deselect the actions you want to allow with the placeholder definition. All of these actions impact how the contributor works with the contribution region.

  5. In the allowed region definitions, click Add to add a region definition, and a region template.

  6. In the allowed subtemplates, click Add to add a subtemplate.

  7. Click Remove in any section to remove the selected region definition, region template, or subtemplate, as applicable.

When editing the placeholder definition, you should keep the region definitions, region templates, and subtemplates in mind.

For more information, see Section A.72, "Placeholder Definition Dialog," and Section 9.8, "Working With Placeholder Definitions."

9.3.2 Editing a Region Definition

When the region definition has been created, you can open it to include the element definitions you need.

To edit a region definition, perform these tasks:

  1. In the menu on the Site Assets pane, select Region Definition.

  2. From the list, select the region definition to be edited and click the Edit icon (Figure 9-3).

    The region definition dialog opens. For more information, see Section A.42, "Region Definition Dialog."

    Figure 9-3 Edit Icon

    Edit icon
  3. Enter a description for the region definition.

  4. Click Add to add elements to the region definition.

    The element dialog opens.

    The Name you give the element is the name used to identify the element within the region definition, and in any other site assets that refer to this region definition.

    The Label you give the element definition is the name of the element (located in the toolbar) in Contributor.

    The Info you enter for the element you add opens as a tooltip when the contributor hovers the mouse over the Label.

  5. Select an element and click Remove to remove an element.

  6. Select an element and click Move Up or Move Down to change the order of elements in the region definition.

    The order of elements is the order that they display in when Contributor is opened for the contribution region based on this region definition.

In this dialog, you should include all of the elements you want to include in the region definition. You can use and place these element definitions in the region template when the region template and region definition are associated.

For more information, see Section 9.9, "Working With Region Definitions."

9.3.3 Editing an Element Definition

To edit an element definition, perform these tasks:

  1. In the menu on the Site Assets pane, select Element Definitions.

  2. From the list, select the element definition to be edited and click the Edit icon (Figure 9-4).

    A dialog opens that enables you to edit the selected element definition. Depending on the element type, one of these screens opens:

    Figure 9-4 Edit Icon

    Edit Asset Icon
  3. Enter the info for the element definition. This is a short description of the element to help you remember how the element definition was set up. The information you provide here helps you remember, at a glance, which specific settings you have placed in the element definition. This is especially helpful if you have created multiple similar element definitions with only slight differences in the actions from each other.

  4. Select or deselect the actions you would like to allow the contributor to have for the selected element definition.

If you are creating a custom element, the process is different.

In each case, the main focus of the editing is to select which objects are available to the contributors on the toolbars. Each element you define has its own toolbar, and what appears on the toolbar (for example, toolbar buttons allowing changes to font size, font style, paragraph formatting, and so forth) is defined when you select or clear the checkboxes in the actions list of an element definition.

It is recommended that you have multiple definitions of each type, to allow for different toolbars that the users can have in different instances. For specific information on the actions available to modify in each element definition, see the specific screen listed above.

9.4 Copying a Definition

It is simple to copy a definition from one you have already made, allowing you to modify one or two aspects of it to make asset creation go much faster.

To copy a definition, follow these steps:

Copying a Definition from the list

  1. In the menu on the Site Assets pane, select the definition type.

  2. Select the definition you want to copy from the list.

  3. Click the Create New icon (Figure 9-5), select Copy, and then Selected:

    The Assign Info Form opens for you to check the item into the content server.

    Figure 9-5 Create New Icon

    Create New icon
  4. Enter appropriate values for the Assign Info Form.

  5. When complete, click Assign Info.

  6. The definition is copied.

When the definition has been copied, it can then be opened to edit.

Copying a Definition from the server

  1. In the menu on the Site Assets pane, select the definition type.

  2. Click the Create New icon (Figure 9-5), select Copy, and then from Server.

    A search results page opens.

  3. Click the corresponding Select button of the ones you want to copy.

    The Assign Info Form opens for you to check the item into the content server.

  4. Enter appropriate values for the Assign Info Form.

  5. When complete, click Assign Info.

  6. The definition is copied.

Copying a Definition from your local instance

  1. In the menu on the Site Assets pane, select the definition type.

  2. Click the Create New icon (Figure 9-5), select Copy, and then from Local.

    An open file dialog opens.

  3. On your local instance, navigate to the definition you want to copy.

  4. Select the definition and click Open.

    The Assign Info Form opens for you to check the item into the content server.

  5. Enter appropriate values for the Assign Info Form.

  6. When complete, click Assign Info.

  7. The definition is copied.

9.5 Viewing the Content Information of a Definition

To view content information for a definition, perform these tasks:

  1. In the menu on the Site Assets pane, select the definition type.

  2. Select a definition from the list.

  3. Click the Doc Info icon (Figure 9-6).

    The content information page opens.

    Figure 9-6 Doc Info icon

    Document Info icon

9.6 Adding a Definition to a Site

To add a definition to a site, perform these tasks:

  1. In the menu on the Site Assets pane, select the definition type.

  2. Click the Add to Site icon (Figure 9-7).

    A search results page opens.

    Figure 9-7 Add to Site Icon

    Add to Site icon
  3. Select the definition or definitions to add, click Site Studio, and then Select Marked Documents.

  4. Depending on your configuration, you may receive a caution that you are about to add existing asset(s) to your site. Click OK.

    The definition is now associated with the web site, and you can now open the definition to edit.

9.7 Removing a Definition from a Site

To remove a definition from a site, perform these tasks:

  1. In the menu on the Site Assets pane, select the definition type.

  2. From the list, select the definition to be removed and click the Remove From Site icon (Figure 9-8).

    When you remove a definition, you are simply removing it from the site, not deleting from the content server.

    Figure 9-8 Remove from Site Icon

    Remove from Site icon

9.8 Working With Placeholder Definitions

When you insert a placeholder on a page template, it is simply a named marker where content displays. The placeholder definition controls how the data opens in the placeholder. Placeholder definitions also control if the contributor can approve or reject the assets in workflow, if the contributor can view web reports, if the contributor can edit the assets in the placeholder, and more.

The relationship between the placeholder name and the placeholder definition is called the mapping. These mappings are used to determine the placeholder definition used as the default when you create a new placeholder.

The mappings can be done in four ways. A default mapping is defined in the web site properties under the Default Placeholder Definition. If a mapping is made here, then it is the one used between a placeholder definition and a placeholder name if none of the other three mappings have been defined.

A global mapping, made in the Placeholder Definition Mappings dialog (see Section A.73, "Placeholder Definition Mappings Dialog"), establishes a default mapping for the placeholder name throughout the site. The placeholder name can be used on multiple templates in multiple sections, and the same mapping applies.

A section property mapping is defined in the section properties under the Primary Page Placeholder Definition Mappings and Secondary Page Placeholder Definition Mappings. The section this is done in now uses a different mapping from any other section where the placeholder is used. The section property mapping overrides a global mapping and a default mapping, but not a mapping in a tag.

The fourth method of creating a mapping is by defining the mapping in the placeholder tag itself. This type of mapping overrides all other mappings, including global mappings. When you define a mapping in the placeholder tag, you are making a change to the placeholder tag in source view. When you use a mapping this way, this means that every time the page template is used, the placeholder on the template always uses the specified placeholder definition regardless of where in the web site the page template is used.

What the contribution region identified by the placeholder contains, and how it looks on the site, is defined using region templates and region definitions (see Section 3.10, "Region Templates and Region Definitions"). A page template may contain multiple placeholders, each of which represents a contribution region on the page. There are no files associated with placeholders; that is, there are no "placeholder files" on the content server.

This section covers the following topics:

9.8.1 Specifying a Default Placeholder Definition

The default placeholder definition is the placeholder definition used when no other mappings apply. It is considered more of a "catch-all."

To specify a default placeholder definition, follow these steps:

  1. In the Web Site Properties, click in the Default Placeholder Definition.

  2. Click the additional information icon that appears.

    A content server search opens, showing the available placeholder definitions.

  3. Select the placeholder definition to use as the default.

  4. The default placeholder definition appears in the web site properties.

9.8.2 Creating a Global Placeholder Definition Mapping

The list of available global placeholder mappings are defined on the Placeholder Definition Mappings dialog (see Section A.73, "Placeholder Definition Mappings Dialog"), which is available by selecting Tools from the menu bar, then selecting Define Placeholder Definition Mappings. The placeholder mappings allow a placeholder to have a different definition depending on whether the placeholder is used on a primary or a secondary page. The mappings are stored in the project file for the web site.

The global placeholder definition mapping overrides the mapping created as the default placeholder definition in the web site properties (see Section 9.8.1, "Specifying a Default Placeholder Definition").

To create a global placeholder mapping, follow these steps:

  1. From the menu bar, select Tools, and then Define Placeholder Definition Mappings.

    The Placeholder Mappings dialog opens (see Section A.73, "Placeholder Definition Mappings Dialog").

  2. Click Add to create a new mapping.

    The Define Placeholder Definition Mapping dialog opens (see Section A.74, "Define Placeholder Definition Mapping Dialog").

  3. Enter a placeholder name that is easy to recognize, and also helps you understand what the mapping does. In the two menus, enter a placeholder definition that the placeholder uses on a primary page and on a secondary page. You can enter for either a primary page or a secondary page, or both.

  4. Click OK.

  5. Your placeholder definitions now display in the Placeholder Mappings dialog, and are available to select when you insert a placeholder.

9.8.3 Creating a Section Property Placeholder Definition Mapping

The section property placeholder definition mapping lists the mapping between a placeholder name and a placeholder definition. The section this mapping is in uses a different mapping from any other section where the placeholder is used.

The section property placeholder definition mapping overrides the global placeholder definition mapping and the default placeholder definition.

There are two ways to make this section property, by using a dialog, and by entering the placeholder name and placeholder definition directly in the section properties. The dialog uses a friendlier user interface.

To create a section property placeholder definition mapping using the dialog, follow these steps:

  1. Right-click a page template within the appropriate section in the hierarchy. In the menu, select Placeholder Section Properties...

    The Placeholder Section Properties dialog opens (see Section A.70, "Placeholder Section Properties Dialog").

  2. Click Add.

    The Edit Placeholder Section Properties dialog opens (see Section A.71, "Edit Placeholder Section Properties Dialog").

  3. Enter the Name, and the placeholder definition ID . If you want to include a region template, subtemplate, or contributor data file in the section property, add those as well.

  4. Click OK to close the Edit Placeholder Section Properties dialog.

    The section property placeholder name mapping is created.

  5. Click OK to close the Placeholder Section Properties dialog.

To create a section property placeholder definition mapping directly in the section properties, follow these steps:

  1. View the section properties for the section you want to create the mapping in.

  2. In the Primary Page Placeholder Definition Mappings, enter the placeholder name and placeholder definition in this format:

    name=contentID
    

    where the name is the placeholder name, and the content ID is the content ID of the placeholder definition. To enter multiple placeholder names and placeholder definitions, use an ampersand ('&') between each pairing, in this manner:

    name1=contentID1&name2=contentID2&name3=contentID3
    
  3. For the secondary pages, enter a placeholder name and placeholder definition for the Secondary Page Placeholder Definition Mappings. Multiple name and definition pairings are allowed just as in the Primary Page Placeholder Definition Mappings.

  4. The Primary and Secondary Page Placeholder Definition Mappings display in the section properties.

9.8.4 Specifying a Placeholder Definition Directly in the Placeholder Tag

The placeholder tag can be written so that the placeholder definition is specified explicitly in the placeholder tag. This direct specification is used each time the page template is used.

This method of correlating a placeholder definition and a placeholder tag overrides all other placeholder definition mappings.

To specify the placeholder definition directly in the placeholder tag, follow these steps:

  1. Open the page template that contains the placeholder.

  2. Click the Source View tab.

  3. In the placeholder tag, enter the mapping in this manner:

    <!--$wcmPlaceholder("Sales", "placeholderDefinitionDocName=placedef_salescontact")-->
    

    In this example, the placeholder name is Sales, and the placeholder definition content ID is placedef_salescontact.

  4. The mapping is now created in the tag.

You can also assign a placeholder definition to be written in the tag from the Define Placeholder dialog (see Section A.75, "Define Placeholder Dialog"):

  1. Open the page template that contains the placeholder.

  2. Double-click the placeholder.

    The Define Placeholder dialog opens.

    You can also do this by inserting a new placeholder.

  3. The name in the menu is the name of the placeholder you selected (unless the placeholder is new). Check the Optionally specify the placeholder definition on the template checkbox.

    The dialog expands. Select the placeholder definition to map in the placeholder tag from the menu.

  4. The mapping is now created in the tag.

9.8.5 Associating a Placeholder with a Global Placeholder Definition

When you have created the placeholder mappings, the placeholder definition is associated to placeholders you create according to the mappings.

By using a different placeholder definition in a placeholder, you can use different subtemplates, region templates, or allow for some instances of a placeholder to be available to contributors for editing, or any other aspect that has been defined in your placeholder definition.

To associate a placeholder with a global placeholder definition, follow these steps:

  1. Insert the placeholder on the page template (see Section 8.4, "Inserting Placeholders")

  2. As you insert the placeholder, the Define Placeholder dialog (see Section A.75, "Define Placeholder Dialog") opens. Select a placeholder name.

  3. Click OK.

  4. The placeholder definition is now associated with the placeholder.

9.8.6 Adding a Region Definition to a Placeholder Definition

The placeholder definitions list the region definitions, region templates, and subtemplates associated (and thus available to use) with the placeholder. Adding a region definition to, or removing a region definition from, a placeholder definition is a very simple task.

When a region definition is associated with a placeholder, then only those elements that are associated with that region definition are available to use in Contributor. This is especially important to remember in those cases where you might give a contributor access to switch the region content or the region template.

To associate a region definition with a placeholder definition, follow these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") appears.

  2. In the Allowed Region Definitions pane, click Add.

    The Select a Region Definition Dialog appears.

  3. Select a region definition, and click OK.

  4. The region definition is now associated with the placeholder definition.

When you have added a region definition, you may want to add a region template to associate with the definition.

To remove a region definition from a placeholder definition, follow these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") appears.

  2. In the Allowed Region Definitions pane, select a region definition.

  3. Click Remove.

  4. The region definition is now removed from the placeholder definition.

9.8.7 Associating a Region Template with a Placeholder Definition

The placeholder definition lists the region definitions, region templates, and subtemplates associated (and thus available to use) with the placeholder. Adding a region definition to, or removing a region definition from, a placeholder definition is a very simple task.

When a region template is associated with a placeholder, then the region template along with the region definition used, can define the element definitions which displays the data and be available in Contributor. Region templates are used to define a specific layout of elements; when a region template is added, it must be associated with a region definition already in the placeholder definition.

To associate a region template with a placeholder definition, follow these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") opens.

  2. In the Allowed Region Definitions pane, select a region definition that the region template is used with.

  3. In the Allowed Region Templates pane, click Add.

    The Select a Region Template Dialog opens.

  4. Select a region definition, and click OK.

  5. The region definition is now associated with the placeholder definition.

Only those region templates that are associated to a region definition display in the Select Region Template dialog. The association between a region template and a region definition is stored as metadata on the region template.

To make a region template the default, complete these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") opens.

  2. In the Allowed Region Definitions pane, select a region definition.

    The Allowed Region Templates pane displays the associated region templates.

  3. In the Allowed Region Templates pane, select a region definition.

  4. Click Make Default.

  5. The region template is now the default template for the selected region definition within this placeholder definition.

To remove a region template from a placeholder definition, follow these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") appears.

  2. In the Allowed Region Templates pane, select a region template.

  3. Click Remove.

  4. The region template is now removed from the placeholder definition.

9.8.8 Associating a Subtemplate with a Placeholder Definition

The placeholder definition lists the region definitions, region templates, and subtemplates associated (and thus available to use) with the placeholder. Adding a subtemplate to, or removing a subtemplate from, a placeholder definition is a very simple task.

When you use a subtemplate associated with a placeholder, the site assets, and any placeholders on the subtemplate, appear on the final web page. It is not necessary to use a subtemplate.

A subtemplate can be any section of HTML comprised of static assets and placeholders, each with their own definitions. This is especially important to remember in those cases where you might give a contributor access to switch the region content or the region template.

To associate a subtemplate with a placeholder definition, follow these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") appears.

  2. In the Allowed Subtemplates pane, click Add.

    The Select a Subtemplate dialog appears.

  3. Select a subtemplate, and click OK.

  4. The subtemplate is now associated with the placeholder.

To remove a subtemplate from a placeholder definition, follow these steps:

  1. Open the placeholder definition from the Site Assets pane.

    The Placeholder Definition dialog (see Section A.72, "Placeholder Definition Dialog") appears.

  2. In the Allowed Subtemplates pane, select a subtemplate.

  3. Click Remove.

  4. The subtemplate is now removed from the placeholder definition.

9.9 Working With Region Definitions

Each region definition contains a list of associated element definitions. This list of definitions is the complete list of elements available to use in the layout of the region template, after the region template and region definition are associated.

A region template is not required to use all elements available in a region definition. Usually, not all elements are used to display in the region template. However, after Contributor is launched, all elements display in the editor, whether they are displayed in the associated region template or not.

The association between a region template and a region definition is stored in the xRegionDefinition metadata for the region template.

Associating an element definition with a region definition

The region definitions list the element definitions available to use with the region template. Adding an element definition to, or removing an element definition from, a region definition is a very simple task.

To associate an element definition with a region definition, follow these steps:

  1. Open the region definition from the Site Assets pane.

    The Region Definition dialog (see Section A.42, "Region Definition Dialog") appears.

  2. Click Add.

    The Element Dialog (see Section A.43, "Element Dialog") appears.

  3. Enter the information for the element (using a good naming convention to easily recognize the element definition as it is used), select the element definition from the menu, and click OK.

  4. The element definition is now associated with the region definition.

It is also possible to embed the element definition in the region definition. When you embed the element definition, you are creating a singular instance of the named element definition within the region definition, which is not affected by global changes in the way that including the element definition by reference would.

To embed an element definition in a region definition, add it as you would normally, but on the Element Dialog (see Section A.43, "Element Dialog"), check the Embed the element definition inside the region definition checkbox.

To remove an element definition from a region definition, follow these steps:

  1. Open the region definition from the Site Assets pane.

    The Region Definition dialog (see Section A.42, "Region Definition Dialog") appears.

  2. Select an element definition. Click Remove.

  3. The element definition is now removed from the region definition.

Region definitions define the types of content used on a web site. They are essentially groups of individual elements which define the various chunks of reusable information for a particular site content type.

In addition to defining site content types in terms of its constituent parts (elements), region definitions also specify the content creation and switching options available to contributors for its associated contribution region(s). For example, if a contribution region is set up to allow contributors to switch the content of that region, they might be allowed to use existing contributor data files on the server only (not native documents or new contributor data files). (Please note that placeholder definitions control whether contributors can actually switch content in contribution regions.) Finally, region definitions also set the default metadata for content in contribution regions as it is checked into the content server.

9.10 Working With Element Definitions

Each element definition is used to specify a toolbar, and any customization scripts and validation scripts you may want to include. These scripts are included when creating each element definition.

Elements are controlled by element definitions. An element is basically an instantiation of its associated element definition, which specifies the editing experience available to contributors for the element on the web page (specifically, what editing features are available in the Contributor editor). Element definitions are individually managed site assets, which means that they can be reused within a web site, or even across web sites (providing all sites are managed on the same content server). Elements of the same type may have different element definitions associated with them to provide different editing environments for contributors depending on the context in which the element is used. Similarly, multiple elements may share the same element definition, providing the same editing experience to contributors for each of the elements.

9.11 Viewing Definitions in Designer

There are two ways to view a definition while in Designer: Source view, and Form view. Each offers a different way to look at each definition while working with that template in Designer.

In each definition window in the Designer workspace, there will be two tabs at the bottom. Select the tab to choose the Source view or the Form view for that definition.

This section covers these topics:

9.11.1 Form View

Form view is a graphical user interface for working with a definition. Using the form view, the different options for each definition are easily modified within the dialog. All options available to modify in form view are also available in source view.

Form view provides a dialog in which you can set the properties of definitions; for example, element definitions, region definitions, placeholder definitions, and conversion definitions. Figure 9-9 shows an example of a region definition in form view. Most form views have a Help button that you can click to see context-sensitive help information for the current form.

Figure 9-9 Form View (Region Definition)

Description of Figure 9-9 follows
Description of "Figure 9-9 Form View (Region Definition)"

9.11.2 Source View

Source view displays the code for the definition.

Figure 9-10 Source View

Source view of a template for a web page

The information in source view appears as color-coded text:

  • Black is used for XML code, HTML tag attributes, and text that appears on the web page.

  • Purple is used for HTML tags.

  • Blue is used for HTML tag attribute values.

  • Green is used for Idoc Script, HTML comments, and code inserted by Site Studio.

You can change many of these settings, including the typeface, indentation levels, and line wrapping. For more information, see Section 6.9, "Formatting the Code in Source View."

Source view offers complete control over the site template. This can be especially true if you are implementing several custom assets. In fact, you may find yourself starting off in design view to create the page and then switching to source view to customize the appearance and behavior of the page.

9.12 Definition Bundles

Definition bundles are bundles of site assets; typically a definition and related templates. However, it can be a varying combination of definitions and templates depending on how the bundle is constructed.

This section covers the following topics:

9.12.1 About Definition Bundles

Definition bundles are zipped (compressed) collections of definitions (and related templates, if applicable). A definition bundle is a simple method to take a related grouping of definitions and copy them to another web site, or to a completely different content server.

The definition bundle includes the selected definition, and the related definitions below the selected definition in the hierarchy. If you bundle a selected region definition, then it will include all associated region templates, and element definitions. If you select a placeholder definition, it will bundle all subtemplates, region definitions, region templates, and element definitions associated with the placeholder definition.

9.12.2 Downloading Bundles

When you choose to download a bundle, it is automatically zipped for you, and you will download the zipped file. There are two ways you can download a definition bundle.

You can download a definition bundle based on a selected definition directly from the site assets pane, or you can use the Oracle Content Server to select a definition and download the bundle based on that definition.

Downloading from the Site Assets Pane

To download a definition bundle from the site assets pane, perform these steps:

  1. Select a definition (either placeholder definition, region definition, or element definition) in the site assets pane.

  2. Right-click the definition and choose Download Definition Bundle..

    The save dialog appears.

  3. Name and save the bundle to the local instance.

Downloading from the Menu Bar

To download a definition bundle from the menu bar, perform these steps:

  1. From the menu bar, choose File, then Definitions, then Download.

  2. Select either Placeholder Definition Bundle, Region Definition Bundle, or Element Definition Bundle.

    Oracle Content Server search results are displayed based on the selected definition type.

  3. Select the definition to create and download the bundle from.

    The save dialog appears.

  4. Name and save the bundle to the local instance.

9.12.3 Uploading Bundles

When you upload a bundle in Designer, it is automatically unpacked and associated with the web site you had open in Designer when you uploaded.

The bundle, when packed and downloaded, has the web site you bundled it from still associated with it in the xWebsites metadata field (for more information on metadata, see the Oracle WebCenter Content Technical Reference Guide for Site Studio). The site that is open in Designer will have its metadata value added to the xWebsites field. If you upload the bundle again, it will have the new web site value appended to the xWebsites metadata field, and so forth. The previous value will not be deleted; this means that the site assets you upload this way will have both web sites in the value.

If you upload through the Oracle Content Server, the bundle will not be immediately unpacked. When you upload through Designer, there is a reference point of which web site the bundle should be associated with once unpacked. When uploading through Oracle Content Server, there is no reference for updating the xWebsites field. You will be prompted to select which web sites to associate the content with when you unpack the bundle. Unpacking a bundle on the Oracle Content Server is a separate step from uploading a bundle.

When you go to the Manage Archives page (see the Oracle WebCenter Content Administrator and Manager's Guide for Site Studio), you will need to further unpack it and associate it with the appropriate web site or sites.

Uploading from Designer

To upload a definition bundle to the Oracle Content Server from Designer, perform these steps:

  1. From the menu bar, select File, then select Definitions, then select Upload Definition Bundle....

  2. In the Open dialog, browse to the definition bundle on your file system and then click Open.

  3. The definition bundle is automatically uploaded to the Oracle Content Server.

    Once uploaded, it is automatically unpacked and the xWebsites metadata field data is filled with the web site that was open in Designer when you uploaded the bundle.