ezpublish: last five articles

{*this grabs the last five articles from node 159, regardless of depth. It sorts by publish date in desending order, it also gives an excerpt of the top article and only names of the rest *}
{let test=fetch('content', 'list',
hash(parent_node_id, 159,
class_filter_type, "include", class_filter_array, array(2), "sort_by",
array("published", false()), "depth", 0)) }
{section name=Child loop=$test max=1}
{$Child:item.name}
{$Child:item.data_map.intro.data_text}
<a href={concat("/content/view/full/",$Child:item.node_id)|ezurl}>
Read more...</a> <br>
<br>
{/section}
{section name=Child loop=$test max=4 offset=1}
<li><a href={concat("/content/view/full/",$Child:item.node_id)|ezurl}>{$Child:item.name}</a><br>
{/section}

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <pre>
  • Lines and paragraphs break automatically.

More information about formatting options