list_articles constraint for last month articles
  • How to constraint in list_articles for get last month articles (from current date)?
    I know about between two date values, but how set current date variable in constraint?
  • 1 Comment sorted by
  • {{ assign var="first_month_day" value=$smarty.now|date_format:"%Y-%m-01" }}

    {{ list_articles length="10" ignore_issue="true" constraints="publish_date smaller $first_month_day" order="byPublishDate desc" }}
        <li>{{ $gimme->article->publish_date }}: {{ $gimme->article->name }}</li>
    {{ /list_articles }}