When a controller or a pipeline is processed, the Pipeline Dictionary accepts and stores parameters in key-value pairs. A template can show only the dynamic information that is stored in the Pipeline Dictionary at the time the template is called.
The value of a key-value pair stored in the Pipeline Dictionary can be:
Some key-value pairs are delivered in their simplest form, for example, ProductID = 4569. You could parse the value of the ProductID key and use an <isprint> statement in the template to show the product number directly in the storefront, as shown:
<isprint value = "${pdict.ProductID}">
Many keys have as their value a complex object that acts as a container for many other key-value pairs. However, templates can't show complex objects; they only show simple values, such as strings or numbers. To obtain the values of complex objects' properties, a special notation is used describing the path through the object to the simple property that the template can show.
The following <isprint>
statement
shows how to show the value of the FirstName variable on the DataSheet form of the Buyer
object:
<isprint value = "${pdict.Buyer.dataSheet.firstName}">
Controllers do not manipulate the Pipeline Dictionary directly; instead, they construct an object that is passed to a template. This object consists of name-value pairs.
You can use the UX Studio debugger to view the
contents of the object before it is passed into a template. Within the
template context, the variable pdict
is used to reference
this object.
Information on available key-value pairs in the Pipeline Dictionary can be found in the Properties editor of the pipelet that produces the appropriate key as an output parameter and puts it in the Pipeline Dictionary.
If the value of a key-value pair is a complex object, you need to know the name of its attributes that contain the values you want to appear in a template.
For example, for AddGiftCertificateToBasket (bc_api) it would be:
Dictionary | Key | Value |
---|---|---|
Input | Amount | CurrrentForms.giftcert.purchase.amount.value |
Basket | Basket | |
Message | CurrrentForms.giftcert.purchase.message.value | |
ProductListItem | ProductListItem | |
RecipientEmail | CurrrentForms.giftcert.purchase.email.value | |
RecipientName | CurrrentForms.giftcert.purchase.recipient.value | |
SenderName | CurrrentForms.giftcert.purchase.from.value | |
Shipment | Shipment | |
Output | AddGCErrorMessage | null |
GiftCertificateLineItem | GiftCertificateLineItem |
The available key-value pairs of the selected attribute appear.