Applies to: Jamroom 7.0+ Last verified: 2026-10-24
  • What it does

    {jrCore_list} lists items from any module that stores items: audio, profiles, blog posts, events, and so on. It finds the items, then shows them with a template. Most lists on a Jamroom site are made with it.

    {jrCore_list module="jrProfile" order_by="_created desc" search1="profile_active = 1" require_image="profile_image" limit="5" template="index_list_profiles.tpl"}
  • This lists the 5 newest active profiles that have a profile image. For a walkthrough, see A {jrCore_list} Walkthrough.

  • jrCore_list

    Function
    jrCore_list
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    The module to list items from, such as jrAudio or jrProfile
    template
    string
    item_list.tpl
    off
    Template for the list. Without it: the skin's (module)_item_list.tpl, then the module's templates/item_list.tpl. Use template="null" with assign to get the items as an array instead of HTML.
    search1, search2, ...
    string
    -
    off
    A condition: "(key) (operator) (value)", such as "audio_genre = rock". Several conditions must all match.
    order_by
    string
    -
    off
    Key and direction: "_created desc". Directions: asc, desc, numerical_asc, numerical_desc, random
    group_by
    string
    -
    off
    Group results by a key. Add UNIQUE ("profile_id UNIQUE") for one item per value.
    limit
    int
    10
    off
    The most items to return
    pagebreak
    int
    -
    off
    Items per page, for a paged list. Use with pager.
    simplepagebreak
    int
    -
    off
    Like pagebreak, but without counting all results: faster, with next/previous only
    page
    int
    -
    off
    The page to show, with pagebreak. Pass page=$_post.p: the pager links add p= to the URL.
    pager
    bool
    false
    off
    Add the pager (list_pager.tpl) below a paged list
    pager_template
    string
    -
    off
    Your own pager template, from the active skin
    profile_id
    int
    -
    off
    Only items of this profile
    return_keys
    string
    -
    off
    Comma separated keys to return, instead of all keys
    return_count
    bool
    false
    off
    Return only the number of matching items
    assign
    string
    -
    off
    Put the result in this variable instead of showing it
    no_cache
    bool
    false
    off
    Don't cache this list
    cache_seconds
    int
    -
    off
    How long to cache this list. Default: the cache time in System Core's Global Config.
    privacy_check
    bool
    true
    off
    false includes items from private profiles
    quota_check
    bool
    true
    off
    false includes items from profiles whose quota no longer allows the module
    ignore_pending
    bool
    false
    off
    true includes items waiting for approval
    ignore_missing
    bool
    false
    off
    true leaves out items that lack a key used in a negative condition (!=, not_like, not_in). Faster on large lists.
    skip_triggers
    bool
    false
    off
    Skip the events that let other modules add data, such as user and quota keys on profiles. Faster.
    fdebug
    bool
    false
    off
    Write the SQL of this list to the Debug Log

    Any other parameter is passed to the search and to the template, where {$_params.name} shows it. Modules add their own: require_image="profile_image" (Image Support) only returns items that have that image.

  • Keys you can search and order by

    Each module's items have their own keys, such as audio_title or profile_name. The DataStore Browser on the module's Tools tab shows them. Every item also has system keys: _item_id, _profile_id, _user_id, _created and _updated.

  • Search operators

    Operator Matches Example
    = != equal, not equal audio_genre = rock
    > >= < <= greater or less than audio_file_stream_count > 100
    like not_like text pattern: % is any text, _ one character profile_name like tob%
    in not_in one of a list _profile_id in 1,5,9
    between not_between in a range, inclusive event_date between 20260101,20261231
    regexp a MySQL regular expression audio_title regexp ^[0-9]

    Several search parameters must all match. For either/or, join conditions with || in one parameter:

    search1="user_instrument = guitar || user_instrument = drums"
  • Ordering

    asc and desc order as text, so 11 comes before 2. For numbers, use numerical_asc and numerical_desc. random gives a random order.

    Several order_by parameters (order_by, order_by2, ...) order by several keys. Item Ratings adds order_by="bayesian_rating desc": a weighted rating that ranks items with many votes above items with one high vote.

  • Paging

    {jrCore_list module="jrBlog" order_by="_created desc" pagebreak="10" page=$_post.p pager=true}
  • Faster lists

    • Use limit instead of pagebreak when you don't show a pager. A pagebreak list also counts all results.
    • simplepagebreak pages without the count.
    • order_by="_item_id ..." is the fastest order; random is the slowest.
    • Each extra search condition adds work. On a large site, keep conditions few.
    • skip_triggers=true and ignore_missing=true help on large datastores.
  • Debugging

    Add fdebug=true to write the list's SQL query to the Debug Log (ACP > Dashboard > Activity Log > Debug Log). Developer Tools' Run in Developer Mode turns off caching while you work.

Tags