Changing a Module's Template

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

    A module's templates decide how its pages look: item_detail.tpl for an item's page, item_list.tpl for lists, and so on. Change them without touching the module, so updates don't undo your work:

    1. A skin override: a file in your skin named (module)_(template). Best for larger changes, and kept with your skin.
    2. The Template Editor: change the template in the ACP. See Using the Template Editor.

    Either way, work in a cloned skin. See Cloning a Skin.

  • A skin override

    Copy the module's template into your skin's folder, named after the module:

    modules/jrGallery/templates/item_detail.tpl
      ->  skins/xxMySkin/jrGallery_item_detail.tpl
  • Jamroom now uses your copy for every gallery image page. Change it as you need. A quick test: add some text at the top, and check it shows. If it doesn't, reset the caches, or turn on Run in Developer Mode in Developer Tools.

    To change one list only, not the module's template everywhere, give that {jrCore_list} its own template instead. See Changing How a List Looks.

  • An example: open gallery images in a lightbox

    In jrGallery_item_detail.tpl, wrap the image in a link to the large version, with data-lightbox, so clicking it opens the lightbox Jamroom already includes:

    {jrCore_module_url module="jrGallery" assign="murl"}
    <a href="{$jamroom_url}/{$murl}/image/gallery_image/{$item._item_id}/1280" data-lightbox="images" title="{$item.gallery_title|jrCore_entity_string}">
        {jrImage_display module="jrGallery" type="gallery_image" item_id=$item._item_id size="1280" class="img_scale" alt=$item.gallery_alt_text width=false height=false}
    </a>
  • Keeping up with updates

    When the module is updated, its template may change too. Compare your copy with the new one: the module's Templates tab has a Compare button. See Keeping a Cloned Skin Up to Date.

Tags