Most popular (read) articles list
=================================
Article meta have property :code:`articleStatistics` and inside it You can find :code:`pageViewsNumber`. To simplify syntax for ordering we created :code:`pageViews` alias.
Here is example how to order articles by their page views number:
.. code-block:: twig
{% gimmelist article from articles|order('pageViews', 'desc') %}
{{ article.title }}
{% endgimmelist %}
There is also option to get most popular (ordered by page views) articles from date range.
For example this is how You can list yesterday most popular articles:
.. code-block:: twig
{% gimmelist article from articles|order('pageViews', 'desc')|dateRange('now', '-1 day') %}
{{ article.title }}
{% endgimmelist %}
Filter :code:`dateRange` takes two parameters compatible with PHP strtotime syntax (http://php.net/manual/en/function.strtotime.php):
- start date (<= equal or in past ) - time will be reset to 23:59:59
- end date (>= equal or in feature) - time will be reset to 00:00:00
So :code:`|dateRange('now', '-1 day')` will filter all page views from whole day today and whole yesterday (from midnight)
To activate article page views counting you need to call short twig function.
.. code-block:: twig
{{ countPageView(gimme.article) }}
It will print :code:`