2

I am implementing experience manager with my DD4T solution. I have configured regions and implemented on my DD4T page view. HTML markup seems to be correct but I am not able to drag & drop any component within the region.

Can anyone tell me what will be the default feature of experience manager UI related to region and content. Please suggest, What step I have missed. Below are the markup of my page:

<section class="main" role="main">
    <figure id="ball-box" class="widgetContainer">
        <!-- Start Region: { "title": "Home Page Widget", "allowedComponentTypes": [ {"schema": "tcm:33-76-8", "template": "tcm:33-1675-32"} ], "minOccurs": 1, "maxOccurs": 2 } --> } -->      

<figcaption id="homeWidget" class="homepage widget">
 <!-- Start Component Presentation: {"ComponentID" : "tcm:33-1690", "ComponentModified" : "2014-07-30T16:49:20", "ComponentTemplateID" : "tcm:33-1675-32", "ComponentTemplateModified" : "2014-05-06T19:23:41", "IsRepositoryPublished" : false} -->
    <h2>
        <!-- Start Component Field: {"XPath":"tcm:Content/custom:HomePageWidget/custom:Header[1]"} -->
        <Component text 1>
    </h2>
    <text>
        <!-- Start Component Field: {"XPath":"tcm:Content/custom:HomePageWidget/custom:Description[1]"} -->
        <Component text 2>
    </text>


        <a href="/Services/" class="learn-more"><!-- Start Component Field: {"XPath":"tcm:Content/custom:HomePageWidget/custom:Link[1]/custom:LinkText[1]"} --><Component text 3></a>

</figcaption>

    </figure>
</section>
<!-- Page Settings: {"PageID":"tcm:33-1671-64","PageModified":"2014-07-25T17:35:32","PageTemplateID":"tcm:33-1673-128","PageTemplateModified":"2014-04-23T15:03:59"} --><script type="text/javascript" language="javascript" defer="defer" src="http://<cmsurl>/WebUI/Editors/SiteEdit/Views/Bootstrap/Bootstrap.aspx?mode=js" id="tridion.siteedit"></script>;

My region setting is as below:

<regions>
  <!-- Define all the schema's that are used in a region here -->
  <schemas>
    <schema name="Home Page Widget" tcmUri="tcm:33-76-8" />
  </schemas>
  <templates>
    <!-- Define all the Component Templates that are used in a region here -->
    <template name="HomePage Widget DD4T CT" tcmUri="tcm:33-1675-32"  />

  </templates>

  <!-- Define regions below. Schema must match a schema name in the <schemas> tag. Template must match a template name in the <templates> tag -->
  <region name="Home Page Widget" id="HomePageWidget">
    <allowedComponentTypes>
      <componentType schema="Home Page Widget" template="HomePage Widget DD4T CT" />
    </allowedComponentTypes>
    <minOccurs>1<minOccurs>
    <maxOccurs>2</maxOccurs>
  </region>

</regions>
1
  • The extra comma in the region markup is no problem. It's ignored. Commented Aug 6, 2014 at 9:26

1 Answer 1

4

Your region-defined component template does not match the component template in use inside of the region {"schema": "tcm:33-76-8", "template": "tcm:33-927-32"} vs {"ComponentID" : "tcm:33-1690", "ComponentModified" : "2014-07-30T16:49:20", "ComponentTemplateID" : "tcm:33-1675-32", "ComponentTemplateModified" : "2014-05-06T19:23:41", "IsRepositoryPublished" : false}

That might throw it off a bit.

4
  • Also the min and max settings aren't in the page markup. Normally SiteEdit (XML) configs wouldn't apply for XPM, but I believe DD4T does use at least the Publication context settings for Components and Pages. Maybe it's the same for Regions? Commented Aug 6, 2014 at 8:45
  • The OP is using the Region Xml from the NuGet package 'DD4T.XPM'. It isn't related to the region xml from SiteEdit . So it shouldn't cause any issues afaik. Commented Aug 6, 2014 at 9:28
  • Ah right, good point - i run it very different on the java side Commented Aug 6, 2014 at 10:15
  • I have updated the question with modified region markup. Now the region seems to be working half correctly. Means when I drag a component when some other component are already there it attach with the Same CT which 1st component have. But when I drag and drop component when there is no component available, it is using some other CT, which is not available in my region markup. Can anyone suggest what may be the root cause. Commented Aug 6, 2014 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.