Log in

Theme and style

From MDrivenWiki

If you name a folder to <ModelName>_AssetsTK and put next to your <ModelName>.modlr file, or <ModelName>.ecomdl file the following will happen:

  • <ModelName>_AssetsTK will be included in the Model sent to MDrivenServer when you Upload the model
  • Once on the server MDriven Turnkey will unpack the folder in AppData under the name ExtractForExpansionInSite_AssetsTK
  • Once extracted to ExtractForExpansionInSite_AssetsTK the MDriven Turnkey application will try and mirror the contents of the following folders from ExtractForExpansionInSite_AssetsTK to AppRoot:

Filename/folder example;

If your modlr filename is products.azurewebsites.net__MDrivenServerA0.modlr you should name your folder products.azurewebsites.net__MDrivenServerA0_AssetsTK

Note! You replace the file extension with _AssetsTK.

Folder name Special purpose
EXT_LateBoundAssembly When extending your turnkey app with c# built logic your assemblies goes here
EXT_Scripts Use this to add you of js files Add AppWideAngularScriptIncludes.html here and contents will be added to scripts in app - this is needed to load things before AngularJS compile as you need when creating directives.
SiteAssets general purpose
Content This is where the tkusercss.css should be. If you have it, it will be included in your page
Views\EXT_OverridePages add your cshtml files here either name it as a ViewModel to override the whole page - or put a matching name as you have in Content Override viewmodel column in the AngularUIOverride tagged value value
other names You may have any folder depth with any content with special assets and plugins - they will be replicated on server side
. Files put in the root of _AssetsTK will be mirrored to application root. This is where you put a favicon.png that shows in browser tab

This enables you to merge your own css, styles and c# assemblies for c# developed logic.

Deleting files that was copied but should be removed

To delete a file by this file replication you must append .DELETE as an extension. The file copying logic will look for /xxx/something.ext and delete it when ever it finds a file /xxx/something.ext.DELETE in the replicated data.

Practical issues seen

2016-12-20 11h23 57.png

When using the AssetsTK file copy strategy you may have issues with file creation permissions on the server. Check that the IIS_IUSRS has sufficient rights in App_Data.

You may find a file called ExtractForExpansionInSite.log in App_Data. This will explain further issues with file creation:

Problem expanding AssetsTK:Access to the path 'C:\inetpub\wwwroot\MTTK\App_Data\..\Content\Something.png' is denied.

Time: 11:19:12

If this is the case - fix it by giving access to the IIS user.