A
A
axblue2016-02-02 16:09:34
MODX
axblue, 2016-02-02 16:09:34

How to check condition in modx revo?

Hello. Can you please tell me if it is possible to check the condition in the chunk?
For example, there is such code in a chunk

<div class="progress">
  <div class="progress-bar progress-bar-success" style="width: %">
    <span class="sr-only">35% Complete (success)</span>
  </div>
  <div class="progress-bar progress-bar-warning progress-bar-striped" style="width: %">
    <span class="sr-only">20% Complete (warning)</span>
  </div>
  <div class="progress-bar progress-bar-danger" style="width: %">
    <span class="sr-only">10% Complete (danger)</span>
  </div>
</div>

You need to do something so that, for example, with > 50, the first div would be displayed, with > 80, the second div would be displayed, and so on. Thanks to all.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iPingvo, 2016-02-11
@leshikgo


you can add :else=``...
And by analogy with the rest

A
Alex, 2016-02-02
@astrodeep

should help promo-creative.com/if.html

S
Sanes, 2016-02-02
@Sanes

docs.modx.pro/system/the-basics/filters-input-and-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question