If I understand your question correctly, then I think that this is covered in the Making subfields of embedded multivalue fields editable section of the online documentation (login required).
Something like the following may work:
@@RenderComponentField("componentLinkListField[${TemplateRepeatIndex}].question", 0)@@
This should produce the following output (for the first question):
<span id="_SE_FLD" _SE_FLD="tcm:Content/custom:Content/custom:componentLinkListField[1]/custom:HouseNumber[1]">
-
Update [27/06/2013]
It looks like this is a known issue. For example, some additional functions are given on the Tridion Practice site here.
It appears that there is a workaround for this that allows you to output the necessary Experience Manager / UI code (a HTML comment used on the front-end) just above the field that you want to make editable.
E.g.
<!-- Start Component Field: {{'ID' : 'tcm:99-1234', 'XPath' : 'tcm:Content/custom:Content/custom:question[1]'}} -->
To do this you could write a Razor Helper Function that takes the tcmId of the Component and the name of the field. E.g.
@helper OutputComponentLinkXmCode(string fieldName, string componentTcmId) {
IdentifiableObject component = TridionHelper.Engine.GetObject(componentTcmId);
@String.Format("<!-- Start Component Field: {{'ID' : '{0}', 'XPath' : 'tcm:Content/custom:Content/custom:{1}[1]'}} -->", component.Id, fieldName);
}
You could then call this as follows:
@for (int i = 0; i < Fields.componentLinkListField; i++) {
<div class="question">@OutputComponentLinkXmCode("question",@componentLinkListField[i].ID)@Fields.componentLinkListField[i].Fields.question</div>
<div class="answer">@OutputComponentLinkXmCode("answer",@componentLinkListField[i].ID)@Fields.componentLinkListField[i].Fields.answer</div>
}
I think that the field has to be wrapped in an outer HTML element (hence the Div
in the code sample).
You could also extend the Razor function to multivalued fields (in the inner Component) by passing in the index (currently hardcoded to [1]
).
This also assumes that the Root Element of your inner Q&A Component is still Content
too.