B
B
blackbb2016-04-22 11:16:54
MODX
blackbb, 2016-04-22 11:16:54

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

1 answer(s)
D
display: block, 2016-04-22
@blackbb

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> 
`

You can take the publication date from publishedon or your TV. Introtext can be generated from content, Google output filters. With filters it will look like

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question