mvt:capture
#
Description#
This tag takes the evaluated contents between the mvt:capture tags and saves it to a variable. Available on any page, no item assignment required.
Requirements#
5.33 Engine or Higher
Syntax#
<mvt:capture variable = "variable name">
// Data to save
</mvt:capture>
Example#
<mvt:capture variable="g.myvar">
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function" : "Module",
"Module_Code": "sample",
"Module_Function": "Export_Products"
}
</mvt:capture>
<mvt:eval expr="g.myvar" />
Example using expressions.
<mvt:capture variable="g.myvar">
<mvt:eval expr="(10+5)/3" />
</mvt:capture>
<mvt:eval expr="g.myvar" /> // evaluates to 5