Revindex Storefront

XSL Tokens

Last updated on 2020-06-04 1 mins. to read

Rich text editors are useful for designing static HTML content, however, it lacks the ability to inject data dynamically. Revindex Storefront supports XSL tokens to replace values and provide powerful logic manipulation in specially indicated rich text editors. XSL tokens makes it possible to inject a single line of dynamic data like name, or an entire table of data such as order details.

Simply, XSL tokens are actual XSL statements wrapped in specially enclosed single braces {xsl:value-of /} instead of the usual right angles <xsl:value-of />. For example, the familiar XSL statement:

<xsl:value-of select="in/salesOrder/billingFirstName" />

can be tokenized and safe for use in rich text editors by replacing the right angles with double brackets:

{xsl:value-of select="in/salesOrder/billingFirstName" /}

This allows the rich text editor such as the email template editor or the report visualizer editor to render an editable HTML representation of your design while allowing XSL syntax to seemingly and safely co-exist with your HTML code.

Please note in previous Storefront 10 and older uses a double brackets [[xsl:value-of /]] instead of single braces.


Powered by Revindex Wiki