Template Conditional

Provides the ability to add conditional statements in your pager.js templates.


Usage

Shortcode:

[template_cond]

 

Parameters:

ParametersDescription
[type] is, is_not, greater_than, less_than
[subject] The thing being compared
[value] what to compare it to

 

Code Example:

[template_cond type=is subject=i value=0]
  <div class="row">
    [template_sub_cond type=is subject="i%4" value=0]
  </div>
  <div class="row">
    [/template_sub_cond]
[/template_cond]

The code above checks to see the number of rows and creates a closing </div> tag and opening <div class="row"> every four rows. The result is the printing of four entries per row.

0 Comments

Please sign in to leave a comment.
Have more questions? Submit a request