[[+content_image]]
S
S
Sergey Gnatyuk2015-12-06 21:14:21
MODX
Sergey Gnatyuk, 2015-12-06 21:14:21

How does the getResources plugin work?

Good day!
I have an error, I can not find a solution, the code is:

[[getResources? 
    &tpl=`tplNewsItemMenu` 
    &limit=`4` 
    &includeContent=`1` 
    &includeTVs=`1` 
    &tvPrefix=`*` 
    &processTVs=`1` 
    &depth=`1` 
    &parents=`12`
]]

tplNewsItemMenu output template
<li class="list-news__item clearfix">
  <div class="list-news__date">
    <span class="list-news__day">28</span>
    <span class="list-news__month">Февраля</span>
  </div>
  <a href="" class="list-news__text" target="_blank">
    
  </a>
</li>

Actually, the problem is that the plugin displays content NOT from the "12" category that is specified, but from a separate page that has id = 2. Moreover, the number of displayed items will be the same as pages in category 12, and the content is all will still be taken from the page with id=2 (located at the very root, has no category).
Tell me what the problem is, maybe I screwed up somewhere? Tried reinstalling the plugin, didn't help.

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
R
Ruslan, 2015-12-07
@sgnatyuk

Hello, try to remove &tvPrefix=`*` и &depth=`1`, also in the output template you need to write like this:

<a href="" class="list-news__text" target="_blank">
    [[+longtitle]]
</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question