About the Splash markup language
You can use the Splash markup language created by Digital River to customize and define the pages on your site. Splash controls what appears on your checkout pages and where the page elements appear.
Splash is a custom markup language based on XSLT. Splash allows you to move and modify the layout of your pages without modifying the underlying JSP. Splash interfaces with our dynamically generated XML without intervention by the Web Development team.
You can use the following form tags:
form:get
Syntax
<form:get type="" nextAction="">
HTML and Splash code here
</form:get>
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
type |
No |
Determines the appropriate Global Commerce for the template, Corresponds to dr:form tag in jsp. |
||
nextAction |
No |
Name of the action you want the form to do. |
||
[html attribute] |
No |
The HTML attributes to appear in the HTML source (class, id, and so on). Make sure any attributes required by HTML are present. Example: Include the |
Example:
<form:get type="SearchForm">
html and splash form:input...
</form:get>
Notes
- Supplying the
nextAction
parameter overwrites theform
tag with anaction=[nextAction]
. -
Supplying the
type
attribute creates the form according to thedr:form
tag's form template.Example: Supplying
type="ProductDetailsForm"
sets the form's action toAddItemToRequisition
andtype="UpSellForm"
sets the form's action toHandleInterstitialOffer
. You can find the list of available form templates in the coreXSLGenerationTemplates CE. -
This tag automatically generates the required hidden input fields, same as the dr:form tag in jsp.
Example: The hidden field in the productDetailsForm are as follows:
<input name="Action"type="hidden"value="AddItemToRequisition"/>
<input name="SiteID"type="hidden"value="msstore"/>
<input name="Locale"type="hidden"value="en_US"/>
<input value="" name="Form" type="hidden"/>
<input name="CallingPageID"type="hidden"value="ProductDetailsPage"/>
form:input
Syntax
<form:input type="" data="" suffix=""/>
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
type | Yes | hidden, text, radio, checkbox, password, submit, image, reset, button, file | Defines the HTML input type. | |
data | No |
Supply an XSL value to set as the input's value. Data retrieved from AggregateXML. |
||
suffix | No | true, false | false |
When used inside of a loop and the value is 'true', it appends "$$" and a 4-digit number to the end of the field name. The number starts with 1001, based on the context position within the current loop. Useful for checkoutPayment form when unique inputs are required for payment methods. |
[html attribute] | No |
The HTML attributes to appear in the HTML source (class, id, and so on). Make sure any attributes required by HTML are present. Example: Include the |
Example:
<form:input type="hidden" data="quantity"/>
<form:input type="submit"/>
<form:input type="radio" name="paymentMethod" value="creditCard" suffix="true"/>
form:post
Syntax
<form:post type="" nextAction="">
HTML and Splash code here
</form:post>
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
type | No |
Determines the appropriate Global Commerce for the template, Corresponds to dr:form tag in jsp. |
||
nextAction | No |
Name of the action you want the form to do. |
||
[html attribute] | No |
The HTML attributes to appear in the HTML source (class, id, and so on). Make sure any attributes required by HTML are present. Example: Include the |
Example:
<form:post type="CheckoutForm"> html and splash form:input... </form:post>
Notes
- Supplying the
nextAction
parameter overwrites theform
tag with anaction=[nextAction]
. -
Supplying the
type
attribute creates the form according to thedr:form
tag's form template.Example: Supplying
type="ProductDetailsForm"
sets the form's action toAddItemToRequisition
andtype="UpSellForm"
sets the form's action toHandleInterstitialOffer
. You can find the list of available form templates in the coreXSLGenerationTemplates CE. -
This tag automatically generates the required hidden input fields, same as the dr:form tag in jsp.
Example: The hidden field in the productDetailsForm are as follows:
<input name="Action"type="hidden"value="AddItemToRequisition"/>
<input name="SiteID"type="hidden"value="msstore"/>
<input name="Locale"type="hidden"value="en_US"/>
<input value="" name="Form" type="hidden"/>
<input name="CallingPageID"type="hidden"value="ProductDetailsPage"/>
form:select
Syntax
<form:select data="" suffix=""/>
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
data |
No |
Supply an XSL value to set as the input's value. Data retrieved from AggregateXML. |
||
suffix |
No |
true, false |
false |
When used inside of a loop and the value is 'true', it appends "$$" and a 4-digit number to the end of the field name. The number starts with 1001, based on the context position within the current loop. Useful for checkoutPayment form when unique inputs are required for payment methods. |
[html attribute] |
No |
The HTML attributes to appear in the HTML source (class, id, and so on). Make sure any attributes required by HTML are present.Include the value field even if it is a hidden field. |
Example:
<form:select data="variationAttributes"/>
Notes
- You may need new features to customize
option
tags.
You can use the following Get tags:
- get:error
- get:length
- get:path
- get:text
- get:value
- get:var
get:length
Syntax
<get:length data="" list=""/>
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
data |
No |
|
||
list | No |
Example:
<get:length list="lineItems"/>
<get:length data="productName"/>
Notes
- When you pass in the
data
parameter, the system returns the length of that string. - When you pass in the
list
parameter, the system returns the number of items in that list.
get:text
Syntax
<get:text key=""/>
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
key |
Yes | Name of the text attribute to retrieve. |
Example:
<get:text key="YOU_SAVE_COLON"/>
<img alt="{get:text key='CHECKOUT_BUTTON'}"/>
Notes
- You can insert a
get
value inside another tag (as an attribute value) using curly brackets {} as in the example above. - To retrieve a text attribute from Big Blue, you must define the text attribute in the corresponding page's
textAttributes
content element.
get:value
Syntax
<get:value data="" escape="" parentSelfClose="" replace="" with="" startAt="" truncateAfter="" />
Attributes
Attribute | Required? | Values | Default | Description |
---|---|---|---|---|
data |
Yes |
Supply an XSL value to set as the input's value. Data retrieved from AggregateXML. |
||
escape | No |
no, yes |
yes |
Specifies whether you want to use special escape (reserved) characters like: ></'; Use this attribute when the retrieved data contains special characters. Usually you can edit this kind of data. Use |
parentSelfClose | No |
false, true |
true |
Determines whether the containing Document Object Model (DOM) element self-closes (</>) or not. Useful in preventing HTML issues when the data could be null or does not exist. |
replace | No |
string |
Required when you use the with parameter. The string provided with the with attribute replaces the string provided with the replace attribute. |
|
startAt | No |
integer [n] | Deletes the first n characters in a string. |
|
truncateAfter | No |
integer [n] |
Deletes the last n characters in a string. |
|
with |
No |
string |
Required when you use the replace parameter. The string provided with the with attribute replaces the string provided with the replace attribute. |
Example:
<get:value data="productName" escape="no" parentSelfClose="false"/>
<get:value data="shortDescription" replace="foo" with="bar"/>
<img alt="{get:value data='productName'}"/>
Notes
- The system searches for the text in the
replace
attribute in the data string and replaces it the string in thewith
attribute. -
Use the following attribute as a shorthand for inserting a get:value into an attribute:
attribute="{dataName}"
Note that you cannot use any additional parameters in this syntax. To include additional parameters, you must use:
attribute="{get:value data='dataName' escape='no'}"
You can use the following If tags:
if:contains
Syntax
<if:contains value="" data="" list=""/>
HTML and Splash here
</if:contains/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
value | Yes | The system searches the data for the specified value. | ||
data | No | Indicates whether the data should or should not contain the value. | ||
list | No | Indicates whether the list should or should not contain the value. |
Example:
<if:contains data="locale" value="en"/>
<get:value data="locale"/>is an English speaking locale.
</if:contains/>
if:exists
Syntax
<if:exists data="" list=""/>
HTML and Splash here
</if:exists/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
data | No | |||
list | No |
Example:
<if:exists data="locale"/>
code here
</if:exists/>
if:greaterthan
Syntax
<if:greaterThan data="" compareData="" length="" list="" position="" value=""/>
HTML and Splash here
</if:greaterThan/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
data | No |
Supply an XSL value to set as the input's value. Data retrieved from AggregateXML. |
||
compareData | No |
The system compares the string for the |
||
length | No | Length of a string. | ||
list | No |
The list to test. |
||
position | No |
Index within a loop, 1 based. |
||
value | No |
The value to compare against |
Example:
<if:greaterThan data="productID" value="20000"/>
code here
</if:greaterThan/>
<if:greaterThan data="quantity" compareData="maxQuantity"/>
code here
</if:greaterThan/>
<if:greaterThan list="lineItems" position="2"/>
code here
</if:greaterThan/>
if:equal
Syntax
<if:equal data="" compareData="" length="" list="" position="" value=""/>
HTML and Splash here
</if:equal/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
data | No |
The data to test. |
||
compareData | No |
The system compares the string for the |
||
length | No |
Length of a string when you supply |
||
list | No |
The list to test. |
||
position | No | Index within a loop (1 based), or the values "even", "odd", or "last." | ||
value | No |
The value to compare against the |
Example:
<if:equal data="locale" value="en_US"/>
code here
</if:equal/>
<if:equal data="locale" compareData="selectedLocale"/>
code here
</if:equal/>
<if:equal position="2"/>
code here
</if:equal/>
<if:equal data="locale" length="5"/>
code here
</if:equal/>
<if:equal list="lineItems" length="0"/>
code here
</if:equal/>
if:lessthan
Syntax
<if:lessThan data="" compareData="" length="" list="" position="" value=""/>
HTML and Splash here
</if:lessThan/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
data | No |
The data to test. |
||
compareData | No |
The system compares the string for the |
||
length | No |
Length of a string when you supply |
||
list | No |
The list to test. |
||
position | No |
Index within a loop, 1 based. |
||
value | No |
The value to compare against |
Example:
<if:lessThan data="productID" value="20000"/>
code here
</if:lessThan/>
<if:lessThan data="maxQuantity" compareData="quantity"/>
code here
</if:lessThan/>
<if:lessThan list="lineItems" position="2"/>
code here
</if:lessThan/>
if:notcontains
Syntax
<if:notContains value="" data="" list=""/>
HTML and Splash here
</if:notContains/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
value | Yes | The system searches the data for the specified value. | ||
data | No | Indicates whether the data should or should not contain the value. | ||
list | No | Indicates whether the list should or should not contain the value. |
Example:
<if:notContains data="locale" value="en"/>
<get:value data="locale"/> is not an English speaking locale.
</if:notContains/>
if:notequal
Syntax
<if:notEqual data="" compareData="" length="" list="" position="" value=""/>
HTML and Splash here
</if:notEqual/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
data | No |
The data to test. |
||
compareData | No |
The system compares the string for the |
||
length | No |
Length of a string when you supply |
||
list | No | List to check when you supply the length attribute. |
||
position | No |
Index within a loop, 1 based. |
||
value | No |
The value to compare against the |
Example:
<if:notEqual data="locale" value="en_US"/>
code here
</if:notEqual/>
<if:notEqual data="locale" compareData="selectedLocale"/>
code here
</if:notEqual/>
<if:notEqual list="lineItems" position="2"/>
code here
</if:notEqual/>
if:notexists
Syntax
<if:notExists data="" list=""/>
HTML and Splash here
</if:notExists/>
Attributes
Attribute | Required | Value | Default | Description |
---|---|---|---|---|
data | No | Data to test. | ||
list | No | List to test. |
Example:
<if:notExists data="locale"/>
code here
</if:notExists/>
<if:notExists list="lineItems"/>
code here
</if:equal/>
if:startswith
Syntax
In the example below, the attributes in bold are required.
<if:startsWith data="" value="">
HTML and Splash here
</if:startsWith>
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
data | Yes |
The data to test. |
|
value | Yes |
The value to compare against the |
Example:
<if:startsWith data="locale" value="en"> This is an English language locale </if:startsWith>
You can use the following Loop tags:
Syntax
<loop:each list="">
HTML and Splash here
</loop:each>
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
list | Yes | Name of list to loop through. |
Example:
<loop:each list="lineItems"> <get:value data="quantity"/> </loop:each>
loop:position
Syntax
<loop:position/>
{loop:position}
Example:
<loop:each list="lineItems"> This is line item number <loop:position/> <loop:each>
<loop:each list="lineItems"> <div id="lineItem{loop:position}"> Test </div> </loop:each>
Notes
You can only use this tag inside a loop:each
tag. Returns the current position inside a loop (index) starting with 1.
You can use the following Page tags:
page:attribute
Syntax
<page:attribute name="">
HTML and splash tags here
</page:attribute>
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
name | Yes | N/A | Applies an attribute to its parent element. |
Example:
<div id="testBlock"> <page:attribute name="test"> test value here </page:attribute> </div> Outputs: <div id="testBlock" test="test value here"></div>
page:comment
Syntax
<page:comment>
Add HTML comment here, it will be written to the generated source code
</page:comment>
Example:
<page:comment> Add HTML comment here, it will be written to the generated source code </page:comment>
Notes
Any text within the comment tag will appear in the document's source code with HTML comment tags wrapping it.
Example:
<!-- Add HTML comment here, it will be written to the generated source code -->
page:element
Syntax
<page:element type="" displayType=""/>
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
type | Yes | The name of page element as defined in the tag expansion. | |
displayType | No | (Optional) Only exists for page elements where this you explicitly define this parameter. |
Example:
<page:element type="variationData" displayType="dropdown"/>
page:tableRow
Syntax
<page:tableRow class="" evenClass="" oddClass="" *="">
HTML and splash tags here
</page:tableRow>
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
class | No |
The data to test. |
|
evenClass | No | The value to compare against the data. | |
oddClass | No | The CSS class name to apply to odd rows. | |
[any attribute] | No |
You can use any valid XHTML attribute here and system will apply it to the resulting HTML Example: class, id, or data-xxx |
Example:
<page:tableRow evenClass="rowEven" oddClass="rowOdd">
Notes
The evenClass
and oddClass
attributes only work when you call the page:tableRow
within a loop.
Example:
<loop:each list="locales">
<page:tableRow evenClass="dr_even" oddClass="dr_odd">
<td><get:value data="locale"/></td>
</page:tableRow>
</loop:each>
page:var
Syntax
<page:var name="" data="" value=""/>
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
name | Yes | The name of the you want to variable. | |
data | No | The data used to populate the variable (same as get:value ). |
|
value | No | An optional static value that you assign to the variable. |
Example:
Set the variable equal to a data value (get:value
):
<page:var name="variable1" data="locale"/>
Set the variable equal to a string (literal):
<page:var name="variable2" value="testValue"/>
Use conditional statements to define the variable (if logic):
<page:var name="variable2"> <if:notEqual data="locale" value="en_US"> <get:value data="locale"> </if:notEqual> </page:var>
Notes
You can retrieve values stored in <page:var>
with <get:var>
.
page:with
Syntax
<page:with data="" />
Attributes
Attribute | Required | Default Value | Description |
---|---|---|---|
data | Yes | Prepends an XSL Path/XPath value to any statements following it. |
Example:
<page:with data="lineItems"> <get:value data="quantity"> </page:with>
Notes
- This tag sets a new root for any contained XPATH statements. The data attribute can reference any data point defined in the xslGeneration.
-
When invoked, the example above translates the XPath statement associated with the
lineItems
data point and uses this as a prefix for any subsequently called data points.
Example: If the XPATH statement in your XSLGeneration CE for lineItems
is:
/threePgCheckoutShoppingCart/lineItems
and the XPATH statement for quantity
is:
/lineItem/quantity
The resulting XPATH from the code above would prepend /threePgCheckoutShoppingCart/lineItems
to every data request inside the page:with
block. So the tag "<get:value data="quantity"/>
" would have an XPATH of:
/threePgCheckoutShoppingCart/lineItems/lineItem/quantity
Use this method when code normally retrieved within a loop is actually outside that loop.