Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys.
How do I register a JS file from within an XSLT template.
I know, it's possible to do from within .cshtml scripts like:
@library.RegisterJavaScriptFile("myScripts", "/scripts/myScript.js");
But how about XSLT?
Hi Ivan,
You can do almost exactly the same: http://our.umbraco.org/wiki/reference/umbracolibrary/registerjavascriptfile
Though it's quite a bit of a hack in XSLT, given that you need to set a variable to nothing to be able to call the extension.
But you can do it if it's the only place it makes sense to do so.
/Chriztian
Hi Chriztian.
Thanks! That's just what I need.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
RegisterJavaScriptFile in XSLT. How?
Hi guys.
How do I register a JS file from within an XSLT template.
I know, it's possible to do from within .cshtml scripts like:
@library.RegisterJavaScriptFile("myScripts", "/scripts/myScript.js");
But how about XSLT?
Hi Ivan,
You can do almost exactly the same: http://our.umbraco.org/wiki/reference/umbracolibrary/registerjavascriptfile
Though it's quite a bit of a hack in XSLT, given that you need to set a variable to nothing to be able to call the extension.
But you can do it if it's the only place it makes sense to do so.
/Chriztian
Hi Chriztian.
Thanks! That's just what I need.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.