'Liferay,Dynamic Data List, template

How can i create a template with velocity or Freemarker for DDL in liferay ? I have a DLL with some data, i would display it not as a table but as a menu beacouse data is defined as [link,text]. i tried this code: <#assign records = ddlDisplayTemplateHelper.getRecords(reserved_record_set_id)> <#if records?has_content> <#list records as cur_record> ll </#list> </#if> in ddl there are 4 records, so this code would return ll ll ll ll , but it returns : Expression ddlDisplayTemplateHelper is undefined on line 1, column 20 in 20155#20195#21230.

why? can anyone help me?



Solution 1:[1]

Using velocity, you can try something like this :

#set($records = $ddlDisplayTemplateHelper.getRecords(reserved_record_set_id))
#foreach($record in $records)
$record
#end

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user0007