Created
December 30, 2015 08:13
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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