In our project we are using a Schema (FAQ) for frequently asked questions. It has a text field heading (for question) and an embedded field paragraph (for Answer) field.
Below is the DD4T Component Template code that we are using -
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 padding-right-8 faq-contant">
<div class="">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-space">
<h2>
<xpm:editable model="${FAQ}" field="heading">
<c:out value="${FAQ.heading}" />
</xpm:editable>
</h2>
</div>
</div>
<divclass="">
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 no-space m_top_22">
<c:forEach var="paragraph" items="${FAQ.paragraph}" varStatus="status" >
<xpm:editable model="${FAQ}" field="paragraph" index="${status.count}">
<c:out value="${paragraph.content}" escapeXml="false" />
</xpm:editable>
</c:forEach>
</div>
</div>
</c:if>
Now when we are accessing that page using Experience Manager, the heading
field is working fine but the paragraph
is not editable.
The JSON ouput of the page -
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-space">
<h2>
<span><!-- Start Component Field: {
"XPath" : "tcm:Content/custom:FAQ/custom:heading[1]"
} -->
Put your heading Here
</span>
</h2>
</div>
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 no-space m_top_22">
<span><!-- Start Component Field: {
"XPath" : "tcm:Metadata/custom:Metadata/custom:paragraph[1]/custom:paragraph[1]"
} -->
Here is the description
</span>
</div>