aw2.loop
Loop Object. Within a loop you have access to the loop object
—————————-
[aw2.get loop.<selector>]
loop.index
The Current Index
loop.counter
Zero based counter
loop.odd
returns 0 or 1
loop.even
returns 0 or 1
loop.first
returns 0 or 1
loop.last
returns 0 or 1
loop.between
returns 0 or 1
loop.series.2
returns 0 or 1 for the series 1,3,5,7
loop.key
The Current Key
loop.value
The Current Value
loop.source
The original array which you are looping through
[aw2.loop module.x] //** get Current Index **// [aw2.get loop.index /] //*** Zero based counter ***// [aw2.get loop.counter /] //***Odd Even First Last Between***// [aw2.true loop.odd]Odd[/aw2.true] [aw2.true loop.even]even[/aw2.true] [aw2.true loop.first]First[/aw2.true] [aw2.true loop.last]Last[/aw2.true] [aw2.true loop.between]Between[/aw2.true] //*** loop key ***// [aw2.get loop.key /] [/aw2.loop]
Other shortcodes
Conditionals (7)
Core (11)
- aw2.run
- aw2.return
- aw2.template
- aw2.module
- aw2.raw
- aw2.get
- aw2.set_array
- aw2.set
- aw2.echo
- aw2.shortcode
- aw2.part
CRM (1)
Database (1)
Design & JavaScript (3)
- aw2.enqueue
- aw2.client
- aw2.spa
E-commerce (1)
Excelsheet (1)
- excel.write_bulk
Form Handling (3)
- aw2.sideload
- aw2.save_form
- aw2.upload
Mailing & SMS (3)
- aw2.subscribe
- aw2.sms
- aw2.wp_mail
PDF (1)
Utility (6)
- aw2.register
- aw2.register_handler
- aw2.reset_password
- aw2.login_handler
- app.restore
- app.backup
Latest Blogs
And there’s one thing I keep noticing: Everyone's obsessed with growth hacks.