Site categories use view mappings to define UI details for repository items. View mappings consist of an item mapping that corresponds to the repository item to display in the UI and multiple item view mappings and item views for each tab on the UI.

View mappings use property view mappings and property views that can be defined on a per property basis. The item view mapping holds the relevant property view mappings. Default editors are defined based on the data type of the property.

View mappings use attributes such as required or read only to define relevant UI details. For information on creating required or read only properties, refer to the Creating Required or Read Only Properties section. Both item and property views have attribute definitions defined. The item and property view mappings, as well as the item mapping, have attribute values defined. The attribute values and the attribute definitions are combined into one attribute map. View mapping finds item mappings that use the four following attributes in the Item Mapping repository: name, itemName, itemPath, and mode properties.

Multiple view mappings can refer to the same repository item, allowing you to configure view mappings that identify different attributes or values for each property.

The following diagram displays the relationship between the elements in view mapping. This diagram also displays the ATG naming convention for these elements:

The view mappings repository holds an ItemMapping repository item for each site category. The site category and its item mapping association are configured using the item mapping name value.

The item mapping name used for the category must be unique and should be formatted as SiteCategory:category name. The view mapping item name and item path are set to the Site Configuration repository item values.

Default site category configuration information is stored in the viewmapping.xml file. The following item mapping is used when the SiteRepository:siteTemplate item view mapping is set to SiteCategory:default:

<add-item item-descriptor="itemMapping" id="SaImSiteDefaultCategory">
  <set-property name="name"><![CDATA[SiteCategory:default]]>
      </set-property>
  <set-property name="description"><![CDATA[AssetManager default site
      itemMapping]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/atg/multisite/SiteRepository]]>
      </set-property>
  <set-property name="itemName"><![CDATA[siteConfiguration]]>
      </set-property>
  <set-property name="formHandler"><![CDATA[SaFhSite]]></set-property>
  <set-property name="viewMappings"><![CDATA[SaIvmSiteDefaultCategory]]>
      </set-property>
  <set-property name="attributes"><![CDATA[resourceBundle=SaAvSiteBnd,
      showCreationId=SaAvCatCreateId]]></set-property>
</add-item>

<add-item item-descriptor="itemViewMapping" id="SaIvmSiteDefaultCategory">
  <set-property name="name"><![CDATA[AssetManager default site
      itemViewMapping]]></set-property>
  <set-property name="displayName"><![CDATA[SaIvmSiteDefaultCategory.
      displayName]]></set-property>
  <set-property name="view"><![CDATA[SaIvBaseSiteConfig]]></set-property>
  <set-property name="propertyMappings"><![CDATA[openDate=SaPvmTimeStamp,
      closingDate=SaPvmTimeStamp,
      name=SaPvmSiteName,
      contextRoot=SaPvmSiteURL,
      productionURL=SaPvmSiteURL,
      siteDownURL=SaPvmSiteURL,
      preOpeningURL=SaPvmSiteURL,
      postClosingURL=SaPvmSiteURL,
      additionalProductionURLs=SaPvmAlternativeURL,
      sitePriority=SaPvmSitePriority,
      siteTypes=SaPvmSiteTypes]]>
      </set-property>
 <set-property name="attributeValues"><![CDATA[resourceBundle=SaAvSiteBnd,
      includedCategories=SaAvDefCatIncludedCats,
      includeNewProperties=SaAvDefCatIncNewProps]]>
      </set-property>
</add-item>
<add-item item-descriptor="attributeValue" id="SaAvDefCatIncNewProps">
  <set-property name="value"><![CDATA[true]]></set-property>
</add-item>

The default site category can be modified to limit the number of configurable properties available. However, keep in mind that:

Important Warning

When creating a site category item mapping, do not modify the default item mapping. To ensure that the item mapping properties are available, make a copy of the item mappings and work with the copy.

Site Administration defines custom propertyView and propertyViewMapping items that provide enhanced functionality to the default property editors. In addition, other ATG modules define their own specific propertyView and propertyViewMapping items that create enhanced functionality for their site properties.

Ensure that all default PropertyViewMapping items are available across all site category ItemMappings. If you create your own PropertyViewMapping, you must ensure that it includes everything that is contained in the default PropertyViewMapping. Using the default PropertyViewMapping also allows you to update only one PropertyViewMaping file, which updates all site categories using the file.

Also ensure that your site category itemViewMapping.propertyMappings property includes the mappings to custom propertyViewMappings. You can identify the mappings that are in your default site category by querying the viewmapping repository, located at/atg/web/viewmapping
/ViewMappingRepository
, with:

<print-item item-descriptor="itemViewMapping"
  id="SaIvmSiteDefaultCategory" />

In addition, whenever you add your own custom propertyView and propertyViewMapping items, you should add them to the defaultTemplate and any other site categories that use the related property.

For in-depth information on creating and using view mapping, refer to the Customizing Asset Display chapter of the ATG Content Administration Programming Guide and the Controlling Details and Pane Properties section of the ATG Business Control Center Administration and Development Guide.