"COUNT" Snippets


Basket #36954

Created: 1490113529
View "Basket #36954"
<mvt:assign name="l.settings:days[1]" value="'Sunday'" /> <mvt:assign name="l.settings:days[2]" value="'Monday'" /> <mvt:assign name="l.settings:days[3]" value="'Tuesday'" /> <mvt:assign name="l.settings:days[4]" value="'Wednesday'" /> <mvt:assign name="l.settings:days[5]" value="'Thursday'" /> <mvt:assign name="l.settings:days[6]" value="'Friday'" /> <mvt:assign name="l.settings:days[7]" value="'Saturday'" /> <mvt:assign name="l.settings:meals[1]" value="'Breakfast'" /> <mvt:assign name="l.settings:meals[2]" value="'Lunch'" /> <mvt:assign name="l.settings:meals[3]" value="'Dinner'" /> <ul> <mvt:foreach iterator="day" array="days"> <li> <h2>&mvt:day;</h2> <div> l.pos1=<mvt:eval expr="g.pos1" /><br> l.count1=<mvt:eval expr="g.count1" /> </div> <ul> <mvt:foreach iterator="meal" array="meals"> <li> <h4>&mvt:meal;</h4> <div> l.pos2=<mvt:eval expr="l.pos2" /><br> l.count2=<mvt:eval expr="l.count2" /> </div> </li> </mvt:foreach> </ul> </li> </mvt:foreach> </ul>
 
View "mvt:foreach has l.posN & l.countN"
<mvt:assign name="l.settings:days[1]" value="'Sunday'" /> <mvt:assign name="l.settings:days[2]" value="'Monday'" /> <mvt:assign name="l.settings:days[3]" value="'Tuesday'" /> <mvt:assign name="l.settings:days[4]" value="'Wednesday'" /> <mvt:assign name="l.settings:days[5]" value="'Thursday'" /> <mvt:assign name="l.settings:days[6]" value="'Friday'" /> <mvt:assign name="l.settings:days[7]" value="'Saturday'" /> <mvt:assign name="l.settings:meals[1]" value="'Breakfast'" /> <mvt:assign name="l.settings:meals[2]" value="'Lunch'" /> <mvt:assign name="l.settings:meals[3]" value="'Dinner'" /> <ul> <mvt:foreach iterator="day" array="days"> <li> <h2>&mvt:day;</h2> <div> l.pos1=<mvt:eval expr="l.pos1" /><br> l.count1=<mvt:eval expr="l.count1" /> </div> <ul> <mvt:foreach iterator="meal" array="meals"> <li> <h4>&mvt:meal;</h4> <div> l.pos2=<mvt:eval expr="l.pos2" /><br> l.count2=<mvt:eval expr="l.count2" /> </div> </li> </mvt:foreach> </ul> </li> </mvt:foreach> </ul>
 
View "mvt:foreach has l.pos1 & l.count"
<mvt:assign name="l.settings:days[1]" value="'Sunday'" /> <mvt:assign name="l.settings:days[2]" value="'Monday'" /> <mvt:assign name="l.settings:days[3]" value="'Tuesday'" /> <mvt:assign name="l.settings:days[4]" value="'Wednesday'" /> <mvt:assign name="l.settings:days[5]" value="'Thursday'" /> <mvt:assign name="l.settings:days[6]" value="'Friday'" /> <mvt:assign name="l.settings:days[7]" value="'Saturday'" /> <mvt:assign name="l.settings:meals[1]" value="'Breakfast'" /> <mvt:assign name="l.settings:meals[2]" value="'Lunch'" /> <mvt:assign name="l.settings:meals[3]" value="'Dinner'" /> <ul> <mvt:foreach iterator="day" array="days"> <li> <h2>&mvt:day;</h2> <div> l.pos1=<mvt:eval expr="l.pos1" /><br> l.count1=<mvt:eval expr="l.count1" /> </div> <ul> <mvt:foreach iterator="meal" array="meals"> <li> <h4>&mvt:meal;</h4> <div> l.pos2=<mvt:eval expr="l.pos2" /><br> l.count2=<mvt:eval expr="l.count2" /> </div> </li> </mvt:foreach> </ul> </li> </mvt:foreach> </ul>
 
View "mvt:foreach has l.pos1 & l.count"
<mvt:assign name="l.settings:days[1]" value="'Sunday'" /> <mvt:assign name="l.settings:days[2]" value="'Monday'" /> <mvt:assign name="l.settings:days[3]" value="'Tuesday'" /> <mvt:assign name="l.settings:days[4]" value="'Wednesday'" /> <mvt:assign name="l.settings:days[5]" value="'Thursday'" /> <mvt:assign name="l.settings:days[6]" value="'Friday'" /> <mvt:assign name="l.settings:days[7]" value="'Saturday'" /> <mvt:assign name="l.settings:meals[1]" value="'Breakfast'" /> <mvt:assign name="l.settings:meals[2]" value="'Lunch'" /> <mvt:assign name="l.settings:meals[3]" value="'Dinner'" /> <ul> <mvt:foreach iterator="day" array="days"> <li> <h2>&mvt:day;</h2> <p> l.pos1=<mvt:eval expr="l.pos1" /><br> l.count1=<mvt:eval expr="l.count1" /><br> </p> <ul> <mvt:foreach iterator="meal" array="meals"> <li> <h4>&mvt:meal;</h4> <p> l.pos2=<mvt:eval expr="l.pos2" /><br> l.count2=<mvt:eval expr="l.count2" /><br> </p> </li> </mvt:foreach> </ul> </li> </mvt:foreach> </ul>