most read in last 30 days
  • Hi all

    using 3.5.5 - zen template - block-mostread.tpl

    how do i just list the most read over the last 30 days
  • 3 Comments sorted by
  • Hi Mark,

    You can achieve that by doing something like this:

    {{{ assign var="mydate" value=strtotime('-90 days') }}

    {{ $mydate=$mydate|date_format:'%Y-%m-%d' }}

    {{ list_articles length="10" ignore_publication="true" ignore_issue="true" ignore_section="true" order="bypopularity desc" constraints="publish_date greater_equal $mydate" }}

            {{ $gimme->article->name }}<br />

    {{ /list_articles }}


    Hope it helps.


    All Best,

  • Hey Holman, you sent this to the wrong mark.

    ;-)

    -mark

    On Oct 31, 2012, at 11:00 AM, Holman Romero wrote:

    > Hi Mark,
    >
    > You can achieve that by doing something like this:
    >
    > {{{ assign var="mydate" value=strtotime('-90 days') }}
    >
    > {{ $mydate=$mydate|date_format:'%Y-%m-%d' }}
    >
    > {{ list_articles length="10" ignore_publication="true" ignore_issue="true" ignore_section="true" order="bypopularity desc" constraints="publish_date greater_equal $mydate" }}
    >
    > {{ $gimme->article->name }}
    >
    >
    > {{ /list_articles }}
    >
    >
    > Hope it helps.
    >
    >
    > All Best,
    >
    >
  • thanks