Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Trouble adding dojo module to user interface


I have some trouble adding my dojo module to the user interface.

It tries to access in the episerver/shell.
I have added a module.conifg;

<?xml version="1.0" encoding="utf-8"?>
    <add assembly="Mobile.Web" />
    <add name="MobileWeb" path="Scripts" />

Added my dojo module at ~/ClientResources/js/KeyValueEditor.js, named the module 

declare('MobileWeb.js.KeyValueEditor', [widget, templatedMixin]

and in my block type:

        [ClientEditor(ClientEditingClass = "MobileWeb.js.KeyValueEditor")]
        public virtual string KeyValueCategoryData { getset; }

It works sometimes, but when I changed the dojoModules -> add name attribute to MobileWeb, it wont work anymore.
Anyone knows what this can be?

May 30, 2013 16:37

Just a wild guess (I'm still reading the documentation), but in the Alloy template site's module.config file looks like this:


   <!-- Add a mapping from alloy to ~/ClientResources/Scripts to the dojo loader configuration -->
   <add name="alloy" path="Scripts" /> </dojoModules>


Their "path" points to "Scripts" and that gives you a link to "~/ClientResources/Scripts". While you add "Scripts" as well but you want to point to "~/ClientResources/js". By the same logic shouldn't you write it like this(?):

    <add name="MobileWeb" path="js" />


Edited, Jun 03, 2013 10:27

Please check my answer here. Does it help?

Jun 03, 2013 11:16
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.