24/7 Support: 800.608.6482

Get Started

Developer Docs

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

  • expr
  • This can either be an expression a string, a number, or a combination of all three.

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

Miva believes that all online businesses should have access to a scalable ecommerce platform that can meet their unique business requirements. Miva offers PCI compliant ecommerce, hosting, and custom website design and development solutions. Miva customers have processed over $100 billion in online sales since 1997.

Copyright © 2016 Miva, Inc - All Rights Reserved   Privacy Policy | Store Policy

Links
Contact Us
Receive Tips & Updates

Copyright © 2016 Miva, Inc - All Rights Reserved

Back To The Top