How to extend templateHelpers methods?
-
Hi,
I need to extend the templateHelpers object to include a new method that formats a ‘regular’ URL. However, I’m not sure how to do this. Is it possible?
...
formatStoreUrl: function (url) {
if (wpslSettings.clickableDetails == 1) {
urlText = url.replace(/(^\w+:|^)\/\//, '');
url = '<a href="' + url + '" target="_blank">' + urlText + '</a>';
}
return url;
},
...
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to extend templateHelpers methods?’ is closed to new replies.