Join Now

Click here to join our
growing community:

JOIN LOGIN



Docs

Welcome Tour
Handbook
      Markups
      Variables
      Conditions
      Functions
      Forms
      Commands
      Concepts
Extensions
Pro Modules
Developers



Copyright © 2020
Terms of Use
Privacy Policy
BoltWire

Handbook

New

This is a clever conditional used primarily in search templates to indicate something has changed.

For a simple example: Suppose you had the following pages:

test.cat.lion
test.cat.tiger
test.cat.jaguar
test.dog.wolf
test.dog.hyena
test.dog.coyote

You could create a search function with this template

[(search group=test* template='[if new {+p2}]**{+p2}**<br>[if]{+p3}')]

It would generate a report that looked like this:

cat
lion
tiger
jaguar
dog
wolf
hyena
coyote

Or for a slightly more complicated example, suppose you collected the country of each of your members. You could generate this report:

[(search group=member* template='[if new {+:country}]**{+:country}**<br>[if]{+:country}' sort={+:country} if='inlist {+:state) france,england,germany,spain,italy']

It would generate a nice report of the five specified countries, with all the appropriate members listed underneath each state.

Note: In the rare situation where you have a complicated template that requires you to keep track of more than variable in this way, you can assign a name parameter to the condition to keep them separate.