Answer the question
In order to leave comments, you need to log in
How to display news announcements in modx?
There is a site on modx revo justscoundrel.myjino.ru/. There is a news announcement in the sidebar, but it is not programmed. What is the correct way to do this output with GetResourses or Wayfinder? Now in the resources there is a document "News", in which there will be child documents (news), in fact, they should be displayed.
Answer the question
In order to leave comments, you need to log in
Getresources with a parent parameter pointing to the news container. In the tpl parameter, you specify a chunk with a markup template for one news block, or you write the markup itself directly into tpl using the (?) @CODE operator:
For example,
&tpl=`@CODE:
<div class="news-item">
<div class="date"></div>
<div class="news-title"></div>
<div class="news-intro"></div>
<a href="">подробнее</a>
</div>
`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question