This page is currently still left here so old links will continue to work, but the content is not updated any more.
This helps you create a template with everything it needs (so also pointing to small JavaScript and CSS files), and letting DNN handle the packaging, compression and everything automatically! In case you've never used this DNN feature before, please read up on it on the official site.
This is done automatically using the DNN-Features. All you have to do is extend your tags like this:
- Token Example
- <link rel="stylesheet" href="[App:Path]/Sexy Feature List/Assets/style.css" data-EnableOptimizations="true" />
- <script src="[Portal:HomeDirectory]/2sxc/Sexy Feature List/Assets/scripts.js" type="text/javascript" data-EnableOptimizations="true"></script>
- Razor Example
- <link rel="stylesheet" href="@App.Path/Sexy Feature List/Assets/style.css" data-EnableOptimizations="true" />
New feature in Version 6
Now we can also set the priority. This is important because DNN has a bug that re-orders the JS-files depending on login or not. So by using a number instead of true, you can set priorities. We recommend always using numbers above 100!
- <link rel="stylesheet" href="[App:Path]/Sexy Feature List/Assets/style.css" data-EnableOptimizations="true" />
- <script src="[App:Path]/Sexy Feature List/Assets/scriptsCore.js" type="text/javascript" data-EnableOptimizations="201"></script>
- <script src="[App:Path]/Sexy Feature List/Assets/scriptsAdditional.js" type="text/javascript" data-EnableOptimizations="202"></script>