Wednesday, July 25, 2012

EPiServer Composer Global blocks and EPiServer Commerse

I just learned a nifty workaround to make EPiServer Composer Global Blocks work with EPiServer Commerce.

The core issue is that Composer has EN as the default language while Commerce has EN-US as the default language.
Here is what you need to do for those two to work together.

  1. Go into web.config and search for this line 
    <episerverModules>
        <composer dataContainerId="3" globalFunctionEditingPageId="4" hideDataContainer="false" />
      episerverModules>

    And change hideDataContainer to false
  2. Go into edit mode in EPiServer. where you now will find the composer blocks at the top of the page tree structure. Select the top node and click on the language settings button
    In there enable the two different English languages
  3. Still in the language settings, set the fallback language to English (United States) > English.
  4. Minimize the root folder and then expand it again, so that the page tree is updated with the changes. A flag should appear left most of the Extension data container.

    Now you should be able to create Global content blocks on your site!
To finish up, don't forget to restore the hideDataContainer value to true in web.config.