aw2.template
We use template to differentiate the block of code. We can use it again and again so it will avoid redundancy of code.
[aw2.template box] [/aw2.template]
To run this template you have to write a statement:
[aw2.run templates.box /]
When we want to add nested conditions or loops, template helps you to implement the code.
[aw2.template check_post] [aw2.do cond="{module.gallery_results}" less_than="1"] <section role="error" class="container"> <h3 class="alert alert-warning col-md-12" role="alert">Please add some Gallery <a href="[aw2.get function.site_url]/wp-admin/edit.php?post_type=asf_gallery">Click to add Gallery</a></h3> </section> [/aw2.do] [/aw2.template] [aw2.do logged_in=true] [aw2.if user_can="administrator"] [aw2.run templates.check_post /] [/aw2.if] [/aw2.do]
- If you want to make template global you have to trigger it as init hook by using global=true while writing template.
[aw2.template template_name global=true] <!--add your code--> [/aw2.template]
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.