{jrCore_counter}

  • Overview

    The {jrCore_counter} template function counts stuff.

    It will count whatever you tell it to count as long as that module has a datastore setup.
  • How to use it

    So the {jrCore_counter} template function is used in conjunction with the {jrCore_get_count} template function.

    One sets the value, the other returns the value.
    {* setup counter for page view *}
    {jrCore_counter module="jrProfile" item_id=$_profile_id name="profile_view"}
  • {jrCore_counter}

    Function
    {jrCore_counter}
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    the name of the module with a datastore eg: module="jrProfile"
    item_id
    int
    -
    on
    the id of the item which is having its count added to eg: item_id=$_profile_id
    name
    string
    -
    on
    the thing being counted eg: name="profile_view"
    increment
    int
    1
    off
    if increment is set then that amount will be added to the count. If nothing is set it, 1 will be added to the count. eg: increment="5"
    The counter function counts events that happen.

Share This

Tags