As discussed in the Creating Multisite Applications chapter, the siteIds
property on certain repository items (such as product
and sku
items) is defined as a context membership property. Context membership is used by internal querying mechanisms of the repository to determine whether specific items are associated with specific sites. Context membership properties are specified in the item descriptor definitions. For example:
<item-descriptor name="product" context-membership-property="siteIds" ...>
By default, the value of a siteIds
context membership property can be a collection of string IDs of a single item type (typically siteConfiguration
). For example, the value of a product item’s siteIds
property might be:
siteIds=[homeSite,apparelSite,bargainSite]
To allow context membership properties to hold IDs of multiple Site Repository item types, including other site configuration types and site group types, set the multiItemTypeMembershipsEnabled
property of the SiteMembershipManager
component to true
:
multiItemTypeMembershipsEnabled=true
If multiItemTypeMembershipsEnabled
is true
, SiteMembershipManager
prepends strings to the item ID values in siteIds
properties to distinguish between different item types. The strings it prepends are specified using the prefixToItemDescriptorNameMap
property. This property is a Map whose keys are the prefix strings and whose values are the corresponding item types in the Site Repository.
The default value of prefixToItemDescriptorNameMap
is:
prefixToItemDescriptorNameMap=\
sg=siteGroup
Note that no prefix is needed for the siteConfiguration
item type. So, for example, the value of the siteIds
property of a product might be:
siteIds=[homeSite,sg:siteGroupMA]
If you add new subtypes of the touchpoint
or siteGroup
item type to the Site Repository and multiItemTypeMembershipsEnabled
is true
, you need to add prefixes to the prefixToItemDescriptorNameMap
property for the new item types. For example, if you add a storeConfiguration
item type and a storeGroup
item type, you might set prefixToItemDescriptorNameMap
to:
prefixToItemDescriptorNameMap=\
sg=siteGroup,
st=storeConfiguration,
stg=storeGroup