Hello everyone.
I’m new to modx. I am using modx revolution and I am trying to set up an online magazine, but I am struggling with getresources.
I want to display news articles (each article is a child of Resource (5)). My template has three columns and I want to display the news articles across two of these columns, as follows:
1. In column one I want a headline article
2. In column one, underneath the headline article I want the next three articles
3. In column two, I want a bullet list of the next 6 articles.
I have put the following snippet call between the div class that holds my headline article:
<div class="post">
[[!getResources? &parents=`5` &limit=`1` &tplFirst=`mainarticle` &includeContent=`1` &showHidden=`1` &sortby=`publishedon`]]
</div>
My chunk (mainarticle) is correctly coded and displays output. Here is the chunk:
<div class="title"><h1><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h1></div>
<div class="date">Published On: [[+publishedon:strtotime:date=`%d %B %Y`]]</div>
<div class="body">
<p>[[+introtext:default=`[[+content:ellipsis=`300`]]`]]</p>
<a href="[[~[[+id]]]]"> <class="extra">Continue Reading;</a></div>
Do I now have to put a second snippet call between the div’s where I want my next lot of articles and give this its own &tpl chunk, or do I use another &tpl with output filters within the above call?
Sorry for bugging you guys who think this is a stupid question.