Module.config does not have to be loaded in any project. Your file should be placed in your site folder under ClientResources/Scripts/Editors/CssStringList.js.
I have just added the following package to our nuget feed with some samples:
http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.UI.Samples
You need to include references to "bin\episerver.ui.dll" and "modulesbin\EPiServer.Cms.Shell.UI.dll" to be able to compile.
Thanks, are you saying that i do not need a module.confiig?
I'm still unclear as to why it is requesting
http://localhost/web/secure/Shell/1.0.456/ClientResources/dtk/myapp/editors/CssStringList.js
and getting a 404. I presume there is some url-rewriting or http handling going on?
Sorry, misread your first post. You need a module.config file but it does not have to be included in the project, just located in the site root.
If you have added a new root namespace ("myapp") you need to add this to a module.config file. This is the configuration needed to set this up:
<dojoModules>
<!-- Add a mapping from myapp to ~/ClientResources/Scripts to the dojo loader configuration -->
<add name="myapp" path="Scripts" />
</dojoModules>
The reason why I say "a module config" is that there is one module.config per shell module. So if you would create an add-on you would have a separate module.config file in the root of your add-on.
Hi Linus
Are there any documentation talking about how to use module.config? when does it load from the EPiServer etc? I am also getting very confused.
The module.config documentation in the SDK is probably a good starting point.
Hi
What do you mean by "new root namespace ("myapp")" ? where can I find this namespace? I am currently having the same issue, it always request to
"xxx/Shell/1.0.456/ClientResources/dtk/" location
p.s. My project has "dot" in the project name, e.g. EPiServerSample.Web, it keeps showing me the following error
http://localhost/manage/Shell/1.0.456/ClientResources/dtk/EPiServerSample/Web/editors/StringList.js
@Vincent: Do you have a module.config file in the site root with the following section:
<dojoModules>
<!-- Add a mapping to ~/ClientResources/Scripts to the dojo loader configuration -->
<add name="myapp" path="Scripts" />
</dojoModules>
I'm having the same problem here. No way it's loading the Js files from the right location.
I have a modules file in the root
When a dojo namespace isn't found it's assumed to be rooted at the same level as dojo, hence the requests inside the dtk folder.
The easiest way is probably to base your changes on the module.config included in the sample alloy templates.
My problem occured in the 7.1 version of EPiServer. Thanks to Shaheed from EPiSupport my issue is resolved.
Version 7.1 contains a new version of Dojo (1.8). I had to change the module.config of my plugin to get it to work
also see http://world.episerver.com/Documentation/Items/Release-Notes/EPiServer-CMS/EPiServer-7/Release-Notes--EPiServer-7-1-CMS/
the module.config of the plugin now looks like
<dojo>
<packages>
<add name="ow-epi-extendedontentareaeditor" location="~/modules/ow.epi.extendedContentAreaEditor/Scripts" />
</packages>
<aliases>
<add from="ow/epi/extendedContentAreaEditor/overlayBlockArea" to="ow-epi-extendedontentareaeditor/overlayBlockArea" />
<add from="ow/epi/extendedContentAreaEditor/contentAreaValidator" to="ow-epi-extendedontentareaeditor/contentAreaValidator" />
<add from="ow/epi/extendedContentAreaEditor/formEditingWidget" to="ow-epi-extendedontentareaeditor/formEditingWidget" />
</aliases>
</dojo>
I am trying to get a dojo module to load for a custom property, but the url requested does not exist, im not sure if the module is registering correctly:
episerver requests this url which 404s:
http://localhost/web/secure/Shell/1.0.456/ClientResources/dtk/myapp/editors/CssStringList.js
My modules config contains
modules.config is in the root of the site. its not referenced anywhere in the web.config.
what am i missing?
thanks