Control order in which css and js is added from xslt
I have added some ekstra dashboard functionality to a document type using a macro container and the idea from Chriztian Steinmeier: http://24days.in/umbraco/2013/empty-tabs/
In addional to this I have some table data and use the footable plugin.
So from xslt I add the required css and javascript files like this:
However as soon as I include footable.paginate.min.js the scripts is added in a different order:
and that cause an javascript error as footable.filter.min.js needs to be the first of the javascript files to be included.. also I notice I had to use the absolute url for RegisterJavaScriptFile. If I use the relative path as for css the javascript files isn't add to the <head>.
Is there a way I can control the order in which the files is added? I find it strange that the ordering becomes different as footable.filter.min.js always is first in the xslt file.
In another Umbraco v. 4.11.10 install it doesn't seem to include the javascript with umbraco.library:RegisterJavaScriptFile .. not with relative or absolute path...
Even I tried only to include only one javascript file like:
it didn't seem to include the script in the <head> ... I am not sure if it's a bug, if something has changed here from 4.11.9 to 4.11.10 .. I think it's a bit problematic if you can't control the ordering the files is added and if they not is added in the order you add them in e.g. xslt.. some scripts needs to be included before other.. here footable.min.js must be included before footable.filter.min.js, footable.sort.min.js and if your are using paging then also footable.paginate.min.js.
Because I couldn't find a solution on why they scripts not is added in the order as I add them in xslt, I added them as inline scripts in the html.. this way I at least can control the order the scripts is added and a avoid script errors..
Control order in which css and js is added from xslt
I have added some ekstra dashboard functionality to a document type using a macro container and the idea from Chriztian Steinmeier: http://24days.in/umbraco/2013/empty-tabs/
In addional to this I have some table data and use the footable plugin.
So from xslt I add the required css and javascript files like this:
Which is added in this order:
However as soon as I include footable.paginate.min.js the scripts is added in a different order:
and that cause an javascript error as footable.filter.min.js needs to be the first of the javascript files to be included.. also I notice I had to use the absolute url for RegisterJavaScriptFile. If I use the relative path as for css the javascript files isn't add to the <head>.
Is there a way I can control the order in which the files is added? I find it strange that the ordering becomes different as footable.filter.min.js always is first in the xslt file.
I am using Umbraco v. 4.11.9 install..
/Bjarne
In another Umbraco v. 4.11.10 install it doesn't seem to include the javascript with umbraco.library:RegisterJavaScriptFile .. not with relative or absolute path...
Even I tried only to include only one javascript file like:
it didn't seem to include the script in the <head> ... I am not sure if it's a bug, if something has changed here from 4.11.9 to 4.11.10 .. I think it's a bit problematic if you can't control the ordering the files is added and if they not is added in the order you add them in e.g. xslt.. some scripts needs to be included before other.. here footable.min.js must be included before footable.filter.min.js, footable.sort.min.js and if your are using paging then also footable.paginate.min.js.
Because I couldn't find a solution on why they scripts not is added in the order as I add them in xslt, I added them as inline scripts in the html.. this way I at least can control the order the scripts is added and a avoid script errors..
is working on a reply...