Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Trouble adding dojo module to user interface

Vote:
0

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"?>
<module>
 
  <assemblies>
    <add assembly="Mobile.Web" />
  </assemblies>
 
  <dojoModules>
    <add name="MobileWeb" path="Scripts" />
  </dojoModules>
 
</module>

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?

#71862
May 30, 2013 16:37
Vote:
0

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

 

<dojoModules>
   <!-- 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(?):

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

 

#71956
Edited, Jun 03, 2013 10:27
Vote:
0

Please check my answer here. Does it help?

#71960
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.