stats:articlePopularityPagerSource

Retrieves a pager source with the popularity per article. The objects returned in the pager are ItemPopularity objects with a 'itemId' and a 'popularity' property.

  <stats:articlePopularityPagerSource
      id="pagerSource"
      maxActionItems="10"
      pageSize="5"
      type="view"
      includeArticleTypes="blog" />
  <pager:setPage
      name="pagerSource"
      parameter="pageId"
      default="1" />

  <pager:iterator
      name="pagerSource"
      id="articlePopularity"
      type="com.ndc.statistics.api.domain.ItemPopularity">
    ${articlePopularity.itemId}
    ${articlePopularity.popularity}
  </pager:iterator>

  <pager:actions id="action" name="pagerSource">
    <logic:equal
        name="action"
        property="active"
        value="false">
      <span>${action.label}</span>
    </logic:equal>
    <logic:equal
        name="action"
        property="active"
        value="true">
      <a href="${section.value}?pageId=${action.value}">
        ${action.label}
      </a>
    </logic:equal>
  </pager:actions>  
Syntax
<stats:articlePopularityPagerSource
   author="..."?
   authorId="..."?
   from="..."?
   id="..."
   includeArticleTypes="..."?
   max="..."?
   maxActionItems="..."
   pageSize="..."
   section="..."?
   sectionId="..."?
   to="..."?
   type="..."
   user="..."?
   userId="..."?/>
Attributes
id, mandatory, no runtime expressions

The name of the scripting-variable.

type, mandatory

Action type can be: view, create, update, tag, rate, comment, search, login, message, favorite

user

Name of the scripting-variable where to get the user information from. This can be a PresentationUser, PresentationPerson or Person object.

userId

The id of the user to get the count from.

includeArticleTypes

The type of the article to get the count from.

section

Name of the scripting-variable where to get the user information from. This must be an PresentationSection or Section object.

sectionId

author

Name of the scripting-variable where to get the author information from. This can be a PresentationUser, PresentationPerson or Person object.

authorId

The id of the author to get the count from.

from

Date object or hours back from now

to

Date object or hours back from now

max

The maximum number of items to return.

pageSize, mandatory

maxActionItems, mandatory