Skip to content

Instantly share code, notes, and snippets.

@ocidique
Created December 30, 2015 08:13
Show Gist options
  • Select an option

  • Save ocidique/2c3cd4191b700ff04738 to your computer and use it in GitHub Desktop.

Select an option

Save ocidique/2c3cd4191b700ff04738 to your computer and use it in GitHub Desktop.
Example of Liferay freemarker template snippet that gets nested inputs from structured article
# In structured article nested fields are something like this:
#
# Parent input field: <parentInputValue>
# -- Child input field: <childInputValue>
# Loop through the values and set values as a link where childInputValue is url and parentInputValue as label
<#if parentInputValue.getSiblings()?has_content>
<#list parentInputValue.getSiblings() as current_parentInputValue>
<a href="${current_parentInputValue.childInputValue.data}">${current_parentInputValue.data}</a>
</#list>
</#if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment