Created
October 8, 2017 03:40
-
-
Save malintha/93f87634afd085b984ce4bb0ab6e1c44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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