Conditionals

Provides functionality to add a conditional statement to your template. Much like standard if, else statements, the [cond] shortcode allows you to create conditional statements with no coding knowledge.


Usage

Shortcode:

[cond]

 

Parameters:

ParametersDescription
[type] is, is_not, greater_than, less_than
[subject] The thing being compared. A subject is typically a variable. For example: [cond type=is_not subject="start_time" || value="end_time"]The event has not started yet...[/cond]
[value] What to compare it to

 

Code Example:

[cond type=is subject="{{index}}%3" value=0] code goes here… [/cond]

Sub Conditional

Much like an "if else" or "else" statement, a child of the parent conditional statement.

Usage

Shortcode:

[sub_cond]

Parameters:

ParametersDescription
[type] is, is_not, greater_than, less_than
[subject] The thing being compared. A subject is typically a variable. For example: [cond type=is_not subject="start_time" || value="end_time"]The event has not started yet...[/cond]
[value] What to compare it to

Code Example:

[cond type=is subject="{{index}}%3" value=0] 
  [sub_cond type=is_not subject="{{index}}" value=0]
    </div>
    <div class="row">
  [/sub_cond] 
[/cond]

0 Comments

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