Re: mvt:assign optional index and member attributes please.
You can hard code a index and that will work, but currently you cannot use a variable for an index:
http://www.miva.com/videos/web_developers/arrays/131
Announcement
Collapse
No announcement yet.
mvt:assign optional index and member attributes please.
Collapse
X
-
Re: mvt:assign optional index and member attributes please.
Have you tried the old work-around of putting a string expression in the name part?
E.g.Code:<mvt:assign name="'l.settings:basket:items[' $ g.ItemNumber $ ']:options[' $ g.OptionNumber $ ']:price' " value="some_expression" />
Last edited by Kent Multer; 08-06-15, 02:21 PM.
Leave a comment:
-
Re: mvt:assign optional index and member attributes please.
I know it was mentioned in a previous thread (here) and Brennan said it was on their radar. This would be very beneficial and I would like to see this added as well.
Josh
Leave a comment:
-
mvt:assign optional index and member attributes please.
The mvt:assign function is not quite complete.
Please consider adding optional index and member attributes.
<mvt:assign name="variable_name" index="index " member="member" value="expression" />
Where index = variable or a numeric expression
Where member= variable or a string expression
Also consider:
<mvt:assign name="variable_name[index_expression]:member" value="expression" />
Where [index_expression] is recursively parsed: e.g. name="variable_name[ function( variable[ pointer ] ) ]:member"Tags: None
Leave a comment: