N
N
Nikolai2018-11-28 17:48:01
MODX
Nikolai, 2018-11-28 17:48:01

Snippet output only on a specific resource?

This code is in the template. It is necessary that it be displayed only on a certain resource. How can I do this without creating a new template?

<div class="yes-no row">
                    <div class="yes-no__title col-12">Примеры гранулируемых веществ
                    </div>
                    <div class="yes-no__col col-12 col-sm-6">
                      <i class="yes-no__icon-yes fas fa-check-circle fa-3x"></i>
                      <div class="yes-no__yes">Да
                      </div>
                      <div class="yes-no__ul">
                        
                      </div>
                    </div>
                    <div class="yes-no__col col-6 col-sm-6"><i class="yes-no__icon-no fas fa-times-circle fa-3x"></i>
                      <div class="yes-no__no">Нет
                      </div>
                      <div class="yes-no__ul">
                        
                      </div>
                    </div>
                  </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan, 2018-11-28
@nikolay_akhmetyanov

Wrap the snippet call with a condition checking by resource id, for example (check by resource id = 5 here):


See other filters here - https://cat-art.ru/articles/filtryi-vvoda-vyivoda-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question