Hi,

You can create a 'helper' folder inside your extension, and create a
'navigation.js' helper there.
Inside that helper, you can specify the parent navigation.js as mentioned
below. Then, use, 'o.css.push('navigation.css'), to put your customized css.


var name;
var hps = require('/themes/store/helpers/navigation.js');

var fn = that.resources;
var resources = function(page, meta) {
    var o = fn(page, meta);
    if (!o.css) {
        o.css = [];
    }
    o.css.push('navigation.css');

    return o;
};

You can refer [1] for complete code & example

[1]
https://github.com/splinter/es-apim-feature/blob/master/extensions/publisher/assets/api/themes/default/helpers/list-assets.js

Thanks,

On Wed, Dec 10, 2014 at 11:58 AM, Senduran Balasubramaniyam <
sendu...@wso2.com> wrote:

> Hi all,
>
> I am currently using the Enterprise store’s extension model to customize a
> particular rxt type in the store. Here I have a scenario to override a
> default css (/themes/store/css/navigation.css) within my extensions. I
> found that the navigation.css is return as a resource from the
> navigation.js (/themes/store/helpers/navigation.js) so I override the
> both navigation.css and navigation.js as I wanted. In the navigation.js I
> returned something like
>
> var resources = function(page, meta) {
>     return {
>         js : ['asset-helpers.js', 'navigation.js', 'jquery.validate.js', 
> 'search.js'],
>         css : ['/extensions/assets/<my-rxt>/themes/store/css/navigation.css']
>     };
> };
>
> but when I check the page via the chrome’s Developer tool, the browser is
> looking for
> host:port/store/themes/css//extensions/assets/<my-rxt>/themes/store/css/navigation.css
> from the above path what I could understand is the css :['abc.css'] in
> the helpers js is always being resolved to the default css location.(i.e
> /themes/store/css/abc.css)
> Is there a way that I could return a custom css via the helpers function
> As a workaround I have added my modified css as a link stylesheet to the
> partial which uses the styles.
>
> Thanks
> Senduran
> ​
> --
> *Senduran *
> Software Engineer,
> WSO2, Inc.;  http://wso2.com/ <http://wso2.com/>
> Mobile: +94 77 952 6548
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Denuwanthi De Silva
Software Engineer;
WSO2 Inc.; http://wso2.com,
Email: denuwan...@wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to