Jump to content

How to amend the automatic JS templates

Recommended Posts

For example in the gallery module, there are tags in the templates such as `<div data-ipsPhotoLayout data-ipsPhotoLayout-itemTemplate='gallery.patchwork.indexItem' data-ipsPhotoLayout-maxRows='3' class='ipsPad_half ipsClearfix cGalleryPatchwork_index'>` which in turn include JS to augment the contents with a JS template defined in `applications/gallery/dev/js/front/templates/ips.templates.browse.js`


This starts with:-

ips.templates.set('gallery.patchwork.indexItem', " \
		<span class='cGalleryPatchwork_item' style='width: {{dims.width}}px; height: {{dims.height}}px; margin: {{dims.margin}}px {{dims.marginRight}}px {{dims.margin}}px {{dims.marginLeft}}px'>\

Without wanting to break upgrades/updates I am trying to intercept this via an "application/plugin" so I can amend the template of how it renders the images.  How is it possible to do this (or how to prevent this from running and implement my own version of the JS template) without editing the core JS files in gallery?


Thanks in advance,

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...