24/7 Support: 800.608.6482

Template Language

mvt:eval Executes the expression contained within expr attribute and outputs the expression's value directly to the page. It operates just like mvt:assign except that instead of saving the value/expression to a variable, it will output it directly to the page.

Requires 5.18 Engine or Higher

Psuedo Syntax

Basic Example

Output: The sum is: 3

Attributes

Examples

Using Strings

Strings are always defined by single quotes

Output: bar

Using Numbers

Numbers do not need to be enclosed by single quotes

Output: 100

Using Expressions

Any value contained in the value attribute will automatically be treated as an expression. This means text will be treated as variables and any function available with the Miva Empresa engine (link) will be evaluated.

Finds the substring of l.myvariable starting at the second character until the end of the string and outputs that value to the page.

Using Concatenation

The $ is the concatenation operator in the Miva Template Language can everything is evaluated, it can be used in the value attribute within the mvassign tag.

Output: The length of this string is: 11

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

Copyright © 1997 – 2026 Miva®, Miva Merchant®, MivaPay Vault®, Camp Miva®, Miva Connect®, Vexture℠, Miva, Inc. All Rights Reserved.