Adding a new configurable property to the site category requires updating both the database and the site repository on the management and production schemas. Additionally, the corresponding Web application must be updated to accommodate this new property.
Create a new
siteRepository.xml
file.In the relevant category item mapping, include or exclude your new property. If you are defining a custom
propertyView
, you must update theitemViewMapping.propertyViewMappings
to include the mapping from your new property to yourpropertyViewMapping
. Refer to the Important Warning regarding modifications topropertyViews
andpropertyViewMappings
.For each new property, specify a
display-name-resource
attribute. This attribute should point to a resource bundle that is available in yourclasspath
.Note: Ensure the new resource bundle file has a unique name that does not overwrite an existing resource bundle.
Set the property information as necessary.
Important: ATG best practices suggest that you do not set properties to
required
in thesiterepository.xml
. Instead, use therequired
viewMapping
attribute to set the property torequired
.Note: Ensure that the database column for this property is not set to
Null
.Create the database table necessary to represent the above table. Load the data into the database.
Define any default property editors that are needed to edit the property detail. Refer to the ATG Merchandising Administration Guide for information on creating property editors.
If you are adding a new property to an existing site category, sites that use the category are automatically updated to include the new property. If you are using the includeProperties
attribute you must manually add the new site configuration property to the includeProperties
attribute on the appropriate item view mapping. You must also update the database and Site Repository on both the management and production schemas. Refer to the Add Items section in the ATG Repository Guide for additional information on adding properties.
If you are adding a new table, ensure that the table contains an ID column. If your property requires the creation of a new item type, refer to the SQL Content Repositories section of the ATG Repository Guide.