Good day. Faced a problem in modx. Found a lot of documentation on the Evo, but somehow it didn’t work on the Revo. Either nothing is said at all, or it is mentioned casually and important details are missing. In this regard, there is such a question: 
He created a resource called an article, applied a standard template and applied such code in the content to display the content itself (sorry for the tautology). In the place where the little articles should be displayed attached [[$ news]] chunk.
As a result, the link a [href = "[[~ [[* id]]]]]"] refers to the article page itself, i.e. to the main resource "Articles". (In principle, it is logical). Well, respectively, [[* pagetitle]] and [[* introtext]] also take the context from the main resource "Articles".
What should be displayed in the articles themselves are created attached documents to the article resource:
Initially, I tried to make the articles snippet:
But the trouble is that the modD function getDocumentChildren () does not work on Revo, I found an analogue, as they wrote on the Internet, getChildIds (). But she returns nothing. (More precisely, I tried to call the result of the f-ii and echo and foreach () loop, but he just brought me 3 numbers: 14, 15, 16; instead, as I thought, * id, * pagetitle, * introtext).
As a result, kind people, help to make a page with articles. How to better and more correctly implement this action? (I would like to with the code)
Resource articles:
<div class="container-fluid articles_page"> <div class="container"><center> <h1>НОВОСТИ САЙТА</h1> <div class="divider"> </div> </center> <div class="news-block masonry" data-columns=""> [[$news]] </div> </div> </div> Chunk:
<div> <a href="[[~[[*id]]]]"> <div class="thumbnail"> <img src="http://placehold.it/1280x720" class = "img-responsive" alt=\"\"> <div class=\"caption\"> <h3>[[*pagetitle]]</h3> <span class="date">[[*publishedon:date='%d/%b/%y']]</span> <p>[[*introtext]]</p> </div> </div> </a> </div> Snippet articles:
<?php $results = $modx->getChildIds( $id = 13, $active = 1, $deleted = 0, 'id, pagetitle, published, introtext, content, menuindex, createdby, createdon, deleted, menutitle', $where = '', $sort='createdon', $dir='DESC', $limit = '' ); foreach($results as $key => $value) { if ($value["menutitle"] != "") { $title = $value["menutitle"]; } else{ $title = $value["pagetitle"]; } $items .= " <div> <a href=".$value["createdon"]."> <div class=\"thumbnail\"> <img src=\"http://placehold.it/1280x720\" class = \"img-responsive\" alt=\"\"> <div class=\"caption\"> <h3>".$title."</h3> ".$value["introtext"] ." </div> </div> </a> </div> "; } $output = " <div id=\"pagination\"> <a href=\"#\">< Назад</a> <a href=\"#\">Вперед ></a> </div> "; return $items.$output; Ps How to display a picture - a thumbnail on the page of articles?





