TPRequest Class Methods
The following are the TPRequest class methods listed in alphabetical order.
Syntax
GetNumTCKeys(param1)
Description
Use this method to return the number of key fields available from the target content page. This method returns Null if key fields are not available.
Parameters
None.
Returns
Number.
Syntax
GetTCKey(index)
Description
Use this method to return the name of a key field by its index number. This method returns Null if key field names are not available.
Parameters
Parameter |
Description |
---|---|
index |
Specifies the position of the key in the array of keys as a number. |
Returns
String.
Syntax
GetTCKeys()
Description
Use this method to return the key field names available from the target content page that have been defined through the Context Manager. This method returns Null if the list of key field names is not available.
Parameters
None
Returns
An array of string.
Syntax
GetTCKeyValue(key)
Description
Use this method to return the value of a key field from the target content page. This method always returns a string regardless of the actual field data type as defined on the page. This method returns Null if the specified key value is not available.
Note: For a given key, GetTCKeyValue and GetTCKeyValueByIndex return the same value.
Parameters
Parameter |
Description |
---|---|
key |
Specifies the name of the key as a string. |
Returns
String.
Syntax
GetTCKeyValueByIndex(index)
Description
Use this method to return the value of a key field by its index number. This method always returns a string regardless of the actual field data type as defined on the page. This method returns Null if the specified key value is not available.
Note: For a given key, GetTCKeyValueByIndex and GetTCKeyValue return the same value.
Parameters
Parameter |
Description |
---|---|
index |
Specifies the position of the key in the array of keys as a number. |
Returns
String.
Syntax
isTCKeyAvailable()
Description
Use this method to return a Boolean value indicating whether key values from the target content page are available.
Parameters
None.
Returns
A Boolean value: True if key values from the target content page are available, False otherwise.
Syntax
isTCKeyDependant()
Description
Use this method to return a Boolean value indicating whether the current pagelet instance was defined to be dependent on target content key values.
Parameters
None.
Returns
A Boolean value: True if the current pagelet was defined to be dependent on target content key values, False otherwise.