Type: Technical Task
Affects Version/s: 6.2.0 CE M3
Fix Version/s: 6.2.0 CE M5
The DLUtil class is currently not accessible from Velocity and Freemarker templates. In order to reuse the logic contained in this class, in should be injected in the template context.
As a result, methods of DLUtil can be invoked in Velocity and Freemarker templates. This improvement can be verified by following these steps:
1. Go to Control Panel > Application Display Templates
2. Add a new template "Mime Type List" for Document and Media.
3. Select "Freemarker" as language and paste this code in the editor:
Notice that a method of dlUtil is being invoked to retrieve a list with all mime types supported in media gallery.
4. Go to a page
5. Add a Media Gallery portlet into the page
6. Edit the portlet configuration and select "Mime Type List" from the Display Template list.
7. Save changes.
The portlet displays the list of mime types retrieved through the dlUtil class.