"sort" Snippets


Basket #47914

Created: 1497900663
View "Basket #47914"
<div class="column whole cart-contents"> <div class="row all-hidden medium-all-shown basket-header-row"> <div class="column one-eighth">Order #</div> <div class="column one-eighth">Order Date</div> <div class="column one-eighth align-right">Order Total</div> <div class="column one-fourth">Order Status</div> <div class="column three-eighths">Shipments</div> </div> <mvt:foreach iterator="order" array="orders"> <mvt:assign name="l.settings:list[1]" value="'Order #'" /> <mvt:assign name="l.settings:list[2]" value="'Order Date'" /> <mvt:assign name="l.settings:list[3]" value="'Shipment'" /> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:list, '', -1)" /> <div class="row basket-product-row"> <div class="column half medium-one-eighth"><strong class="medium-all-hidden">Order # </strong>&mvt:order:id;</div> <div class="column half medium-one-eighth"><strong class="medium-all-hidden">Date: </strong>&mvt:order:date_formatted;-1</div> <div class="column half medium-one-eighth medium-align-right"><strong class="medium-all-hidden">Total: </strong>&mvt:order:formatted_total;</div> <div class="column half medium-one-fourth"><strong class="medium-all-hidden">Status: </strong>&mvt:order:order_status;</div> <div class="column three-fourths medium-one-fourth"> <strong class="medium-all-hidden">Shipments: </strong> <mvt:foreach iterator="shipment" array="order:shipments"> &mvt:shipment:tracklink;<br /> </mvt:foreach> </div> <div class="column one-fourth medium-one-eighth align-center"><a href="&mvt:global:secure_sessionurl;Screen=ORDS&amp;Store_Code=&mvta:global:Store_Code;&amp;SortBy=&mvta:global:SortBy;&amp;Offset=&mvta:global:Offset;&amp;Order_ID=&mvt:order:id;&amp;Order_BillEmail=&mvte:global:Order_BillEmail;&amp;Order_BillZip=&mvte:global:Order_BillZip;" class="button button-mini bg-gray charcoal uppercase">View</a></div> </div> </mvt:foreach> </div> <mvt:if expr="(g.Offset OR g.NextOffset) AND (l.settings:orderhistory_list:per_page NE 0)"> <mvt:if expr="g.Offset EQ 0"> <div class="column half">&nbsp;</div> <mvt:else> <form method="post" action="&mvt:global:secure_sessionurl;" class="column half"> <input type="hidden" name="Screen" value="&mvte:global:Screen;" /> <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" /> <input type="hidden" name="SortBy" value="&mvte:global:SortBy;" /> <input type="hidden" name="Order_BillEmail" value="&mvte:global:Order_BillEmail;" /> <input type="hidden" name="Order_BillZip" value="&mvte:global:Order_BillZip;" /> <input type="hidden" name="Offset" value="&mvte:global:PrevOffset;" /> <mvt:item name="buttons" param="Previous" /> </form> </mvt:if> <mvt:if expr="g.NextOffset EQ 0"> <div class="column half">&nbsp;</div> <mvt:else> <form method="post" action="&mvt:global:secure_sessionurl;" class="column half align-right"> <input type="hidden" name="Screen" value="&mvte:global:Screen;" /> <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" /> <input type="hidden" name="SortBy" value="&mvte:global:SortBy;" /> <input type="hidden" name="Order_BillEmail" value="&mvte:global:Order_BillEmail;" /> <input type="hidden" name="Order_BillZip" value="&mvte:global:Order_BillZip;" /> <input type="hidden" name="Offset" value="&mvte:global:NextOffset;" /> <mvt:item name="buttons" param="Next" /> </form> </mvt:if> </mvt:if>
 
View "Miva Template Language New Array and Sort Example"
<mvt:comment> | | By http://www.scotsscripts.com | </mvt:comment> <mvt:assign name="l.settings:list[1]:name" value="'apples'" /> <mvt:assign name="l.settings:list[1]:kind" value="'mac'" /> <mvt:assign name="l.settings:list[1]:color" value="'a'" /> <mvt:assign name="l.settings:list[2]:name" value="'bananas'" /> <mvt:assign name="l.settings:list[2]:kind" value="'South American'" /> <mvt:assign name="l.settings:list[2]:color" value="'C'" /> <mvt:assign name="l.settings:list[3]:name" value="'orange'" /> <mvt:assign name="l.settings:list[3]:kind" value="'Florida'" /> <mvt:assign name="l.settings:list[3]:color" value="'b'" /> <mvt:assign name="l.settings:list[4]:name" value="'orange'" /> <mvt:assign name="l.settings:list[4]:kind" value="'Michigan'" /> <mvt:assign name="l.settings:list[4]:color" value="'d'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> <hr/> </mvt:foreach> <mvt:comment> | | while loop to create new array and add colorsort field | </mvt:comment> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:list)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:list[l.counter]" /> <mvt:assign name="l.struct:colorsort" value="toupper(l.struct:color)" /> <mvt:assign name="l.success" value="miva_array_insert( l.settings:newlist, l.struct, -1 )" /> </mvt:while> <mvt:comment> | |copy new array to original, sort, and display new list | </mvt:comment> <mvt:assign name="l.settings:list" value="l.settings:newlist" /> <mvt:do file="g.module_library_utilities" name="l.success" value="QuickSortArray(l.settings:list,':colorsort', 1)" /> <h2>After Sort</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> colorSort: &mvt:item:colorSort; <hr/> </mvt:foreach>
 

Miva Template Language New Array and Sort Example

Use Miva Template language to sort an existing array by inserting sort keys into the array structure. This is done by creating a new temporary structure with the sort key (colorsort), and then add it to a new array using miva_array_insert(..). When the loop is done, the new temporary array is then copied back into the original array. In miva_array_insert(...) we use -1 for the array index to force it to add the structure to the next array element. Since we are creating a new array, it will be populated from index 1 to the end. We do it this way because there is no other way to add to array structures in the miva template language. Using brackets when trying to add to existing array structures does not work in the miva template language. http://www.scotsscripts.com
Created: 1496961839
View "Miva Template Language New Array and Sort Example"
<mvt:comment>Example by http://www.scotsscripts.com</mvt:comment> <mvt:assign name="l.settings:list[1]:name" value="'apples'" /> <mvt:assign name="l.settings:list[1]:kind" value="'mac'" /> <mvt:assign name="l.settings:list[1]:color" value="'a'" /> <mvt:assign name="l.settings:list[2]:name" value="'bananas'" /> <mvt:assign name="l.settings:list[2]:kind" value="'South American'" /> <mvt:assign name="l.settings:list[2]:color" value="'C'" /> <mvt:assign name="l.settings:list[3]:name" value="'orange'" /> <mvt:assign name="l.settings:list[3]:kind" value="'Florida'" /> <mvt:assign name="l.settings:list[3]:color" value="'b'" /> <mvt:assign name="l.settings:list[4]:name" value="'orange'" /> <mvt:assign name="l.settings:list[4]:kind" value="'Michigan'" /> <mvt:assign name="l.settings:list[4]:color" value="'d'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> <hr/> </mvt:foreach> <mvt:comment>While loop To Create New Array</mvt:comment> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:list)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:list[l.counter]" /> <mvt:assign name="l.struct:colorsort" value="toupper(l.struct:color)" /> <mvt:assign name="l.success" value="miva_array_insert( l.settings:newlist, l.struct, -1 )" /> </mvt:while> <mvt:comment>copy new array to original array</mvt:comment> <mvt:assign name="l.settings:list" value="l.settings:newlist" /> <mvt:comment>sort original array</mvt:comment> <mvt:do file="g.module_library_utilities" name="l.success" value="QuickSortArray(l.settings:list,':colorsort', 1)" /> <h2>After Sort</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> colorSort: &mvt:item:colorSort; <hr/> </mvt:foreach>
 

Miva Template Language New Array and Sort Example

Use Miva Template language to sort an existing array by inserting sort keys into the array structure. This is done by creating a new temporary structure with the sort key (colorsort), and then add it to a new array using miva_array_insert(..). When the loop is done, the new temporary array is then copied back into the original array. In miva_array_insert(...) we use -1 for the array index to force it to add the structure to the next array element. Since we are creating a new array, it will be populated from index 1 to the end. We do it this way because there is no other way to add to array structures in the miva template language. Using brackets when trying to add to existing array structures does not work in the miva template language. http://www.scotsscripts.com
Created: 1496961811
View "Miva Template Language New Array and Sort Example"
TEST<br><br> <mvt:assign name="l.settings:list[1]:name" value="'apples'" /> <mvt:assign name="l.settings:list[1]:kind" value="'mac'" /> <mvt:assign name="l.settings:list[1]:color" value="'a'" /> <mvt:assign name="l.settings:list[2]:name" value="'bananas'" /> <mvt:assign name="l.settings:list[2]:kind" value="'South American'" /> <mvt:assign name="l.settings:list[2]:color" value="'C'" /> <mvt:assign name="l.settings:list[3]:name" value="'orange'" /> <mvt:assign name="l.settings:list[3]:kind" value="'Florida'" /> <mvt:assign name="l.settings:list[3]:color" value="'b'" /> <mvt:assign name="l.settings:list[4]:name" value="'orange'" /> <mvt:assign name="l.settings:list[4]:kind" value="'Michigan'" /> <mvt:assign name="l.settings:list[4]:color" value="'d'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> <hr/> </mvt:foreach> <mvt:comment>While loop To Create New Array</mvt:comment> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:list)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:list[l.counter]" /> <mvt:assign name="l.struct:colorsort" value="toupper(l.struct:color)" /> <mvt:assign name="l.success" value="miva_array_insert( l.settings:newlist, l.struct, -1 )" /> </mvt:while> <mvt:comment>copy new array to original array</mvt:comment> <mvt:assign name="l.settings:list" value="l.settings:newlist" /> <mvt:comment>sort original array</mvt:comment> <mvt:do file="g.module_library_utilities" name="l.success" value="QuickSortArray(l.settings:list,':colorsort', 1)" /> <h2>After Sort</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> colorSort: &mvt:item:colorSort; <hr/> </mvt:foreach>
 

Miva Template Language New Array and Sort Example

Use Miva Template language to sort an existing array by inserting sort keys into the array structure. This is done by creating a new temporary structure with the sort key (colorsort), and then add it to a new array using miva_array_insert(..). When the loop is done, the new temporary array is then copied back into the original array. In miva_array_insert(...) we use -1 for the array index to force it to add the structure to the next array element. Since we are creating a new array, it will be populated from index 1 to the end. We do it this way because there is no other way to add to array structures in the miva template language. Using brackets when trying to add to existing array structures does not work in the miva template language. http://www.scotsscripts.com
Created: 1496961745
View "Miva Template Language New Array and Sort Example"
TEST<br><br> <mvt:assign name="l.settings:list[1]:name" value="'apples'" /> <mvt:assign name="l.settings:list[1]:kind" value="'mac'" /> <mvt:assign name="l.settings:list[1]:color" value="'a'" /> <mvt:assign name="l.settings:list[2]:name" value="'bananas'" /> <mvt:assign name="l.settings:list[2]:kind" value="'South American'" /> <mvt:assign name="l.settings:list[2]:color" value="'C'" /> <mvt:assign name="l.settings:list[3]:name" value="'orange'" /> <mvt:assign name="l.settings:list[3]:kind" value="'Florida'" /> <mvt:assign name="l.settings:list[3]:color" value="'b'" /> <mvt:assign name="l.settings:list[4]:name" value="'orange'" /> <mvt:assign name="l.settings:list[4]:kind" value="'Michigan'" /> <mvt:assign name="l.settings:list[4]:color" value="'d'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> <hr/> </mvt:foreach> <h3>While loop To Create New Array</h3> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:list)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:list[l.counter]" /> <mvt:assign name="l.struct:colorsort" value="toupper(l.struct:color)" /> <mvt:assign name="l.success" value="miva_array_insert( l.settings:newlist, l.struct, -1 )" /> </mvt:while> <mvt:assign name="l.settings:list" value="l.settings:newlist" /> <mvt:do file="g.module_library_utilities" name="l.success" value="QuickSortArray(l.settings:list,':colorsort', 1)" /> <h2>After Sort</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> colorSort: &mvt:item:colorSort; <hr/> </mvt:foreach>
 
View "Miva Template Language New Array and Sort Example"
TEST<br><br> <mvt:assign name="l.settings:list[1]:name" value="'apples'" /> <mvt:assign name="l.settings:list[1]:kind" value="'mac'" /> <mvt:assign name="l.settings:list[1]:color" value="'a'" /> <mvt:assign name="l.settings:list[2]:name" value="'bananas'" /> <mvt:assign name="l.settings:list[2]:kind" value="'South American'" /> <mvt:assign name="l.settings:list[2]:color" value="'C'" /> <mvt:assign name="l.settings:list[3]:name" value="'orange'" /> <mvt:assign name="l.settings:list[3]:kind" value="'Florida'" /> <mvt:assign name="l.settings:list[3]:color" value="'b'" /> <mvt:assign name="l.settings:list[4]:name" value="'orange'" /> <mvt:assign name="l.settings:list[4]:kind" value="'Michigan'" /> <mvt:assign name="l.settings:list[4]:color" value="'d'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> <hr/> </mvt:foreach> <h3>While loop To Create New Array</h3> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:list)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:list[l.counter]" /> <mvt:assign name="l.struct:colorsort" value="toupper(l.struct:color)" /> <mvt:assign name="l.success" value="miva_array_insert( l.settings:newlist, l.struct, -1 )" /> </mvt:while> <mvt:assign name="l.settings:list" value="l.settings:newlist" /> <mvt:do file="g.module_library_utilities" name="l.success" value="QuickSortArray(l.settings:list,':colorsort', 1)" /> <h2>After Sort</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> colorSort: &mvt:item:colorSort; <hr/> </mvt:foreach>
 

Basket #46929

Usage of QuickSortArray
Created: 1496956311
View "Basket #46929"
<mvt:comment> | | By http://www.scotsscripts.com | </mvt:comment> <mvt:assign name="l.settings:order[1]:id" value="'1'" /> <mvt:assign name="l.settings:order[1]:order_status" value="'In Progress'" /> <mvt:assign name="l.settings:order[2]:id" value="'2'" /> <mvt:assign name="l.settings:order[2]:order_status" value="'In Progress'" /> <mvt:assign name="l.settings:order[3]:id" value="'3'" /> <mvt:assign name="l.settings:order[3]:order_status" value="'Pending'" /> <mvt:assign name="l.settings:order[4]:id" value="'4'" /> <mvt:assign name="l.settings:order[4]:order_status" value="'In Progress'" /> <p><b>Original:</b></p> <mvt:foreach iterator="item" array="order"> id: &mvt:item:id; status: &mvt:item:order_status;<br> </mvt:foreach> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:order)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:order[l.counter]" /> <mvt:if expr="tolower(l.struct:order_status) EQ 'pending'"> <mvt:assign name="l.struct:order_status" value="'In Progress'" /> </mvt:if> <mvt:assign name="l.success" value="miva_array_insert( l.settings:temp_array, l.struct, -1 )" /> </mvt:while> <mvt:assign name="l.settings:order" value="l.settings:temp_array" /> <p><b>Updated:</b></p> <mvt:foreach iterator="item" array="order"> id: &mvt:item:id; status: &mvt:item:order_status;<br> </mvt:foreach>
 

Basket #46923

Usage of QuickSortArray
Created: 1496950718
View "Basket #46923"
<mvt:comment> | | By http://www.scotsscripts.com | </mvt:comment> <mvt:assign name="l.settings:list[1]:name" value="'apples'" /> <mvt:assign name="l.settings:list[1]:kind" value="'mac'" /> <mvt:assign name="l.settings:list[1]:color" value="'a'" /> <mvt:assign name="l.settings:list[2]:name" value="'bananas'" /> <mvt:assign name="l.settings:list[2]:kind" value="'South American'" /> <mvt:assign name="l.settings:list[2]:color" value="'C'" /> <mvt:assign name="l.settings:list[3]:name" value="'orange'" /> <mvt:assign name="l.settings:list[3]:kind" value="'Florida'" /> <mvt:assign name="l.settings:list[3]:color" value="'b'" /> <mvt:assign name="l.settings:list[4]:name" value="'orange'" /> <mvt:assign name="l.settings:list[4]:kind" value="'Michigan'" /> <mvt:assign name="l.settings:list[4]:color" value="'d'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> <hr/> </mvt:foreach> <mvt:comment> | | while loop to create new array and add colorsort field | </mvt:comment> <mvt:assign name="l.elements" value="miva_array_elements(l.settings:list)" /> <mvt:while expr="l.counter LT l.elements"> <mvt:assign name="l.counter" value="l.counter + 1" /> <mvt:assign name="l.struct" value="l.settings:list[l.counter]" /> <mvt:assign name="l.struct:colorsort" value="toupper(l.struct:color)" /> <mvt:assign name="l.success" value="miva_array_insert( l.settings:newlist, l.struct, -1 )" /> </mvt:while> <mvt:comment> | |copy new array to original, sort, and display new list | </mvt:comment> <mvt:assign name="l.settings:list" value="l.settings:newlist" /> <mvt:do file="g.module_library_utilities" name="l.success" value="QuickSortArray(l.settings:list,':colorsort', -1)" /> <h2>After Sort</h2> <mvt:foreach iterator="item" array="list"> name: &mvt:item:name;<br> kind: &mvt:item:kind;<br> color: &mvt:item:color;<br> colorSort: &mvt:item:colorSort; <hr/> </mvt:foreach>
 

Basket #32556

Created: 1486502850
View "Basket #32556"
<mvt:assign name="l.settings:shippingmethods[1]:price" value="71.38"/> <mvt:assign name="l.settings:shippingmethods[2]:price" value="17.37"/> <mvt:assign name="l.settings:shippingmethods[3]:price" value="18.42"/> <mvt:assign name="l.settings:shippingmethods[4]:price" value="71.39"/> <mvt:assign name="l.settings:shippingmethods[1]:cost" value="1"/> <mvt:assign name="l.settings:shippingmethods[3]:cost" value="2"/> <mvt:assign name="l.settings:shippingmethods[4]:cost" value="3"/> <mvt:assign name="l.settings:shippingmethods[2]:cost" value="4"/> <h2>Before</h2> <mvt:foreach iterator="item" array="shippingmethods"> &mvt:item;<br> </mvt:foreach> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:shippingmethods, ':cost', 1)" /> <h2>After</h2> <mvt:foreach iterator="item" array="shippingmethods"> &mvt:item;<br> </mvt:foreach> <mvt:assign name="l.settings:test1" value="':price'"/> <mvt:assign name="g.return_value" value="miva_array_sort( l.settings:shippingmethods,'',l.settings:test1)" /> <Br /> <Br /> <Br /> <mvt:foreach iterator="item" array="shippingmethods"> &mvt:item;<br> </mvt:foreach>
 

Basket #28862

Created: 1480959480
View "Basket #28862"
<mvt:assign name="l.settings:list[3]" value="'apples'" /> <mvt:assign name="l.settings:list[1]" value="'bananas'" /> <mvt:assign name="l.settings:list[2]" value="'carrots'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:list, '', 1)" /> <h2>After</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach>
 

Basket #27719

Created: 1478806093
View "Basket #27719"
<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo;<mvt:eval expr="2 + 2" /><mvt:while expr="g.counter LT 10"> <mvt:assign name="g.counter" value="g.counter + 1" /> &mvte:global:counter;<br> </mvt:while>
 

Basket #27695

Created: 1478733584
View "Basket #27695"
<mvt:assign name="l.settings:list[1]" value="'apples'" /> <mvt:assign name="l.settings:list[2]" value="'bananas'" /> <mvt:assign name="l.settings:list[3]" value="'carrots'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:list, '', 1)" /> <h2>After</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach>
 

Basket #19784

Created: 1469229294
View "Basket #19784"
<mvt:assign name="l.settings:list[1]" value="'bananas'" /> <mvt:assign name="l.settings:list[2]" value="'bananas'" /> <mvt:assign name="l.settings:list[3]" value="'carrots'" /> <mvt:assign name="l.settings:list[4]" value="'bananas'" /> <mvt:assign name="l.settings:list[5]" value="'carrots'" /> <mvt:assign name="l.settings:list[6]" value="'bananas'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:list, '', -1)" /> <h2>After</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach>
 

Basket #18999

Created: 1467387891
View "Basket #18999"
<mvt:assign name="g.api_key" value="'http://www.shoppopdisplays.com/mm5/5.00/modules/component/mailchimp.mvc?action=subscribe&api_key=BF1AexYORDY3VA12AQBRaS0CVw1zE0N8Xwk2Q303Qk5uTAUISg==&id=6805f1ce57&email_address=test@aol.com&merge_vars[FNAME]=&merge_vars[LNAME]=&output=json'" /> <mvt:assign name="g.api_key" value="gettoken(g.api_key, '&', 2)" /><br> &mvt:global:api_key; <mvt:assign name="g.api_key" value="gettoken(g.api_key, 'api', 2)" /><br> &mvt:global:api_key;
 
View "Sort One Dimensional Array"
<mvt:assign name="l.settings:list[1]" value="'apples'" /> <mvt:assign name="l.settings:list[2]" value="'bananas'" /> <mvt:assign name="l.settings:list[3]" value="'carrots'" /> <h2>Before</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:list, '', -1)" /> <h2>After</h2> <mvt:foreach iterator="item" array="list"> &mvt:item;<br> </mvt:foreach>