24/7 Support: 800.608.6482

Template Language

mvt:assign Reference Documentation

Requirements For Use

5.18 Engine or Higher

Available on any page, no item assignment required.

Definition

Executes the expression contained within value and saves that value to the variable defined in the name attribute.

Attributes

name

This can be a local or global variable as defined by l. or g.

examples: l.myvariable or g.myglobalvariable.

If no prefix (l. or g.) is given it defaults to be a global variable.

value

The value can either be an expression a string, a number or a combination of all three.

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.

Example:s

strings

Strings are always defined by single quotes.

Example:s

numbers

Numbers do not need to be enclosed by single quotes.

Example:s

Concatenation

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

Example:s

Outputing Values to the Page

If you want to display a value to the screen it needs to a global variable or part of the l.settings structure.

Example:s

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.