E
E
eugene1592019-12-16 22:49:11
MODX
eugene159, 2019-12-16 22:49:11

Why is it that when calling a chunk from a chunk that was called with pdoResources, the same data is output? How to fix?

I call pdoResources, I specify the Test chunk in tpl. And in this chunk, I call another chunk, like this: . I look what happened. It turned out that the same resource is displayed to me in the ItemMd chunk. Why is that? How to fix?
Here is the template code where I call pdoResources:


Here is the code for the Test chunk:

Here is the code for the ItemMd chunk:
<!-- ARTICLE -->
  <article class="article">
      <div class="article-body">
          <h4 class="article-title"><a href=""></a></h4>
          <ul class="article-meta">
              <li><i class="fa fa-clock-o"></i> </li>
          </ul>
      </div>
  </article>
<!-- /ARTICLE -->

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan, 2019-12-19
@ruslan_aleev

Hello, why are you doing this? Wouldn't it be easier to immediately specify the ItemMd chunk in the pdoResource call?
In general, most likely the chunk in the chunk is cached, so it's worth calling the chunk in the chunk like this - , but, I repeat, it's better to immediately use the desired chunk in the call (without nesting).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question