Locates the last profile marker added to a profile.

Class Name

atg.markers.userprofiling.droplet.ProfileHasLastMarker

Component

/atg/markers/userprofiling/droplet/ProfileHasLastMarkerDroplet

Required Input Parameters

key

The value in the marker’s key property. The last profile marker must have the value in its key property that you specify here.

Set this parameter to ANY_VALUE to indicate that the marker’s key value is irrelevant for your purposes. For example:

<dsp:param name="key" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

Optional Input Parameters

itemId

The ID of the profile whose last marker you want to access. If omitted, the value of the input parameter item is used.

item

The profile item whose last marker you want to access. If omitted, the active profile is used.

value

The value in the marker’s value property. The last profile marker must have the value in its value property that you specify here. You can set this parameter to NULL or omit it in order to return the marker only if its value property is null.

Set this parameter to ANY_VALUE in order to indicate that the marker’s value value is irrelevant for your purposes. For example:

<dsp:param name="value" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

data

The value in the marker’s data property. The last profile marker must have the value in its data property that you specify here. You can set this parameter to NULL or omit it in order to return the marker only if its data property is null.

Set this parameter to ANY_VALUE to indicate that the marker’s data value is irrelevant for your purposes. For example:

<dsp:param name="data" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

extendedProperties

A map that specifies any additional marker properties (set to the map’s key) and property values (set to the map’s value) that must exist on the last profile marker in order for to retrieve it.

markerManager

The Profile Marker Manager component to use. If omitted, the Profile Marker Manager indicated in the servlet bean’s repositoryMarkerManager property is used.

markerPropertyName

The property on the profile to check for markers. If omitted, the servlet bean uses the default value specified in its defaultMarkerPropertyName property.

markedItemType

The type of RepositoryItem with markers to work with. If omitted, the servlet bean uses the item’s defaultMarkedItemType property.

Output Parameters

marker

Contains the marker located by the servlet bean.

errorMsg

Contains any error messages generated during the servlet bean’s execution.

Open Parameters

error

Rendered when an error occurs during servlet bean execution.

true

Rendered when the last profile marker added to the profile has the specified property values.

false

Rendered when the last profile marker added to the profile does not have the specified property values.

Usage Notes

ProfileHasLastMarker uses the Profile Marker Manager to determine whether the last profile marker added to a particular profile has the parameters you specify. For example, you can find out if the last marker includes specific values for its key, value, data or other properties. If the last marker has the indicated parameters, the true open parameter is rendered and marker is accessible through the marker output parameter.

For more information on working with marked profiles, see the Using Marked Profiles section in the Using Profile Markers chapter of the ATG Personalization Programming Guide.

Example

The following example shows how to locate the last profile marker on the current user profile. If the profile’s last profile marker has a key of partner, the servlet bean displays the partner’s name, which is stored in the marker value property, followed by is one of our favorite affiliates. Learn why!.

<dsp:droplet
 name="/atg/markers/userprofiling/droplet/ProfileHasLastMarkerDroplet">
   <dsp:param name="key" value="partner"/>
   <dsp:param name="value" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>
   <dsp:param name="data" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

   <dsp:oparam name="true">
      <dsp:param name="marker">
         <dsp:valueof paramvalue="marker.value">
      </dsp:param>
      is one of our favorite affiliates. Learn why!
   </dsp:oparam>

</dsp:droplet>