Foros de discusión

Dynamic Data List - Create Link to detail template with Velocity

Andre Niewoehner, modificado hace 10 años.

Dynamic Data List - Create Link to detail template with Velocity

New Member Mensajes: 3 Fecha de incorporación: 19/01/10 Mensajes recientes
Hi!
I have created a dynamic data list and populated it with data. In the next step I have created a custom list template with velocity and I would like to add links which lead to the detail template of a recordset. Has anyone achieved that yet?
This is my template:

<h1>Länderinformationen</h1> 

#set ($ddlRecordsUtil = $serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService"))  
#set ($recordSetId = $getterUtil.getLong($reserved_record_set_id.data)) 
#set ($records = ${ddlRecordsUtil.getRecords($recordSetId)})  

<br><br><br><br><table>
    <tbody><tr>
        <th>Land</th>
        <th>Ländernummer</th>
        <th>ISO2 Code</th>
        <th>WTO Eintritt</th>
        <th>Präferenzen</th>
        <th>Freihandelsabkommen</th>
        <th>APS/LDC</th>
        <th>APS/OBC</th>
        <th>EU-Land seit</th>
        <th>Zollsatzliste</th>
        <th>Sonstiges</th>
    </tr>
    #foreach ($record in $records)
    <tr>
        <td>$record.getField("nachste4377").getValue()</td>
        <td>$record.getField("nummer10641").getValue() </td>
        <td>$record.getField("nachste6997").getValue() </td>
        <td>$record.getField("nummer15606").getValue() </td>
        <td>$record.getField("nachste23740").getValue() </td>
        <td>$record.getField("text_kasten27129").getValue() </td>
        <td>$record.getField("nachste30494").getValue() </td>
        <td>$record.getField("nachste47400").getValue() </td>
        <td>$record.getField("text_kasten33842").getValue() </td>
        <td>$record.getField("nachste43334").getValue() </td>
        <td>$record.getField("text_kasten71147").getValue() </td>
        
    </tr>
    #endBest regardsAndré</tbody></table>
Ron Schouten, modificado hace 8 años.

RE: Dynamic Data List - Create Link to detail template with Velocity

New Member Mensajes: 3 Fecha de incorporación: 8/01/16 Mensajes recientes
@Andre, did you ever figure this out?
thumbnail
Praful Shukla, modificado hace 8 años.

RE: Dynamic Data List - Create Link to detail template with Velocity

Junior Member Mensajes: 46 Fecha de incorporación: 29/09/15 Mensajes recientes
Hello,
What do mean by detail template of a recordset..??
Could you elaborate it bit more..
Ron Schouten, modificado hace 8 años.

RE: Dynamic Data List - Create Link to detail template with Velocity

New Member Mensajes: 3 Fecha de incorporación: 8/01/16 Mensajes recientes
I can't speak for Andre, but I would like to display a list of Dynamic Data items (using a custom template) and link from each item to a detailed (or full) view of that item.
Bobo Jager, modificado hace 6 años.

RE: Dynamic Data List - Create Link to detail template with Velocity

New Member Mensajes: 11 Fecha de incorporación: 1/08/13 Mensajes recientes
UP
Bobo Jager, modificado hace 6 años.

RE: Dynamic Data List - Create Link to detail template with Velocity

New Member Mensajes: 11 Fecha de incorporación: 1/08/13 Mensajes recientes
I've the same problem: I've created a Display Template where I show all records. So, I want click on VIEW button and go to details (of records) using another DISPLAY TEMPLATE. How can do this?

Thanks in advance