wvuweb / hammer

A tool for CleanSlate theme development
https://cleanslate.wvu.edu
4 stars 2 forks source link

Obey limit in r:articles:each #38

Closed adamjohnson closed 8 years ago

adamjohnson commented 8 years ago

Currently, limit="X" doesn't work in Hammer on r:articles tags (any maybe elsewhere?).

Here's some code to test:

<r:articles:each limit="2">
  <h1 class="wvu-article__title" itemprop="headline"><a href="<r:article:path />"><r:article:name /></a></h1>
  <a href="<r:article:path />">
    <r:article:content name="article__image" />
  </a>
  <r:select_html css_selector="p" limit="4">
    <r:article:content name="article__short-desc" />
  </r:select_html>
</r:articles:each>

Here's what the output looks like:

r-articles-each-limit-hammer

Each heading is a separate blog post in the mock_data file.

And the code for that output:

https://stash.development.wvu.edu/projects/CST/repos/ur-holiday-card-v2/browse/views/custom-patterns/_featured-day.html

Let me know if you need more details.