Hey all, this is the third post about Dynamic Data Lists ant it's focused on how to write the Lists Templates mentioned on the previous post.
As already said, List Templates provides all the flexibility needed to build your own UI. Within the templates context you will have access to all records and fields of these records for the configured list.
We're going to demonstrate this by creating a simple user registation list and then we'll diplay it diffrently using a velocity template.
First thing to do is to instantiate the Dynamic Data List Display portlet and create a new list. The definition of this list will have two fields: name (text field) and avatar (file upload field) (Figure 1).
Figure 1 - List creation
After that we're ready to populate the list. Figure 2 shows the records added.
Figure 2 - User Registration records
Finally, in order to create templates click on the "Add List Template" icon (red mark in Figure 2). Then a pop-up will show up and you can either upload the template file or write one using the code editor. Here's the template used for this example:
And here's the end result: