Skip to content

Instantly share code, notes, and snippets.

@malintha
Created October 8, 2017 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malintha/93f87634afd085b984ce4bb0ab6e1c44 to your computer and use it in GitHub Desktop.
Save malintha/93f87634afd085b984ce4bb0ab6e1c44 to your computer and use it in GitHub Desktop.
var name;
var hps = require('/extensions/app/greg-publisher-defaults/themes/default/helpers/view-asset.js');
var that = this;
/*
In order to inherit all variables in the default helper
*/
for (name in hps) {
if (hps.hasOwnProperty(name)) {
that[name] = hps[name];
}
}
var fn = that.resources||function() { return {} };
var resources = function(page, meta) {
var o = fn(page, meta);
if (!o.css) {
o.css = [];
}
if(!o.js){
o.js = [];
}
if(!o.code){
o.code = [];
}
o.css.push('custom-rxt.css');
return o;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment