A
A
Azat Tagaev2020-02-18 15:16:41
MODX
Azat Tagaev, 2020-02-18 15:16:41

Why doesn't limit in getResources work?

Good afternoon! Please help with Modx.

On one page I use two calls to getResources to display news:

<div class="news-box">
   
</div>
<div class="main-comments">
   <h3 class="main-comments__heading">Случайная новость</h3>
   <ul class="comments-list">
       
    </ul>
</div>


The second call to getResources duplicates the limit of the first one, ignoring its own. Displays 6 posts.
How to fix? Tell!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-02-18
@Borsok

Firstly, the number must be enclosed in back quotes:
&limit=`3`instead &limit='3'
of Secondly, it is better in your case to try to display snippets uncached (with an exclamation mark after the second opening bracket: )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question