{jrCore_module_function}

Applies to: Jamroom 7.0+ Last verified: 2026-10-24
  • jrCore_module_function

    Function
    jrCore_module_function
    parameter
    type
    default
    required
    description
    function
    string
    -
    on
    The template function to run, such as jrRating_form
    (other)
    mixed
    -
    off
    All other parameters are passed to that function

    Runs another module's template function only if that module is active. If the module is missing or off, it shows nothing, instead of an error.

    {jrCore_module_function function="jrRating_form" type="star" module="jrAudio" index="1" item_id=$item._item_id current=$item.audio_rating_1_average_count|default:0 votes=$item.audio_rating_1_number|default:0}
  • {jrRating_form ...} would do the same, but breaks the page on a site without Item Ratings. Skin designers can't know which modules a site has, so use jrCore_module_function for functions from optional modules.

Tags