REgistering multiple dojo/dijit modules in module.config


Hi all,

I have a couple of dojo/dijit components that ive developed for V7. They are both within my main VS project and therefore the module.config file is in the root.

My module.config looks like so:

<?xml version="1.0" encoding="utf-8"?>
  <assemblies loadLocalBin="true">
    <add assembly="MyAssembly" />

    <add name="communityuser" path="CommunityUser/Scripts" />
    <add name="user" path="User/Scripts" />

    <add name="user.requiremodule" path="user/Scripts/RequireModule.js" resourceType="Script" />
    <add name="communityuser.requiremodule" path="communityuser/Scripts/RequireModule.js" resourceType="Script" />

  <clientModule initializer="user/Initialize">
      <add name="user.requiremodule" />
  <clientModule initializer="communityuser/ModuleInitializer">
      <add name="communityuser.requiremodule" />


The problem im running into is that only one of the initializer methods are ever called, whichever one is in the module.config file first. In the example above the user/Initialize file will be called, if I swap the order of the clientModule's, the communityuser/ModuleInitializer file will be called.

Any pointers please? Do i perhaps need to have seperate files, one for each component?

Thanks in advance


Dec 14, 2013 17:54

Any thoughts dojo wizards?

Dec 16, 2013 15:30


In module.config there should be only one client module with one client initializer. A client modules should have initialize method like in the example here.  The rest of modules client components can be initialized in the initialize method. You can also take a look on epi/shell/ShellModule as an example (you might need to install "EPiServer Edit UI – Client side debug support" add-on in order to see the source code)

Dec 17, 2013 14:33
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.