The optional <site> tag is designed for use in environments that support several Web sites. It identifies the Web site to use as a filter for the targeting operation. If no <site> tag is specified, the query automatically applies to the current site (the site the user is visiting). For more information on multisite environments, refer to the ATG Multisite Administration Guide.

The <site> tag has the following syntax:

<site type=...>
  ...
</site>

The <site> tag must be matched by a closing </site> tag.

This tag has one attribute, type, which can have the following values:

  • current

  • any

  • shareable

current

Specifies the current site (the site the user is visiting) as the filter for the query.

<site type=current></site>

Items that have no site membership are included in a query if the value is current. You can also include these items by omitting the <site> tag and making sure the user has an empty site context.

any

The any setting can be used alone, in which case all registered sites are included in the targeting query. It can also be used with one or more child tags that identify specific sites to include in the query (effectively a list of sites to use). Only items that have at least one site specified will be included. If an item has no site membership, it will be ignored.

<site type=any></site>

Or

<site type=any>
  <valueof site="{siteId1}">
  <valueof site="{siteId2}">
</site>

The siteId properties are strings stored in /atg/multisite/SiteRepository. The following example shows the siteIds for ATG Store US and ATG Store Germany from the Commerce Reference Store application:

site type=any>
  <valueof site="storeSiteUS">
  <valueof site="storeSiteDE">
</site>

For more information on the siteId property, refer to the ATG Multisite Administration Guide.

shareable

Identifies one or more shareable types to use for the targeting query. Shareable types are resources such as shopping carts that can be shared among sites in a multisite environment. In this case, the query for the targeting operation includes only sites that are configured to share the specified type. For example, the targeter could look for content only in sites that share a shopping cart.

<site type=shareable>
  <valueof constant="{shareableTypeId}">
</site>

The first example includes all sites that share a shopping cart with the current site. The shareableTypeId is from Commerce Reference Store:

<site type=shareable>
  <valueof constant="atg.shoppingCart">
</site>

The shareable type can also exist in a site other than the current site. The second example includes all sites that share a shopping cart with ATG Store Germany:

<site type=shareable>
  <valueof constant="atg.shoppingCart">
  <valueof site="storeSiteDE">
</site>

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices