Foros de discusión

Display Template & Repeated/Nested Fields

John Studarus, modificado hace 7 años.

Display Template & Repeated/Nested Fields

New Member Mensajes: 2 Fecha de incorporación: 11/08/12 Mensajes recientes
What's the best way to develop a custom display template with a nested and repeated field using Velocity or FreeMarker? I keep running into a null/missing value.

My data list has consists has a text field called "Issues" is repeatable. It has a nested field inside called "Rating". How can I get that Ratings field? I can get the other fields that are note repeated/nested. I just keep getting an null exception.


<#assign records = ddlDisplayTemplateHelper.getRecords(reserved_record_set_id)>

<#if records?has_content>
<#list records as cur_record>

<#if cur_record.getDDMFormFieldValues("Issues")?has_content>
<#list cur_record.getDDMFormFieldValues("Issues") as curValue_Issues>
${ddlDisplayTemplateHelper.renderRecordFieldValue(curValue_Issues.getDDMFormFieldValues("Rating")?first,locale)}
</#list>
</#if>

</#list>
</#if>