Foros de discusión

Set an id for custom application display template

Qu Ga, modificado hace 8 años.

Set an id for custom application display template

Junior Member Mensajes: 36 Fecha de incorporación: 19/02/15 Mensajes recientes
Hi,

A have created a lot of vm application display template for asset publisher. I import them with resources importer.

I want to set a fix id to the ADT instead of something like "174681c1-c552-49f4-8ea3-66b80bc971d3" to have the possibility to use them in a layout with
 #set ($VOID = $velocityPortletPreferences.setValue( 'displayStyle' , 'the name of my ADT')) 


How can I do that?

Thank's in advance !
thumbnail
Samuel Kong, modificado hace 8 años.

RE: Set an id for custom application display template

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
Not sure exactly what you're referring to. Are you referring to the templateId? the UUID? the name? They are all different things.

You cannot specify the templateId or the UUID. However, you can specify anything you want for the name. You may also want to look into the Template Key. You cannot set your own value for the Template Key through the UI, however, you can do it through the API.
Qu Ga, modificado hace 8 años.

RE: Set an id for custom application display template

Junior Member Mensajes: 36 Fecha de incorporación: 19/02/15 Mensajes recientes
I'm not sure to...

I know that my ADT works if I select it in the display settings of my asset publisher portlet.

But what I want to do is to display the custom ADT in my Layout with the display style.

If I put
#set ($VOID = $velocityPortletPreferences.setValue( 'displayStyle' , 'ddmTemplate_f1aa1fbe-78b7-4f9c-b299-1d8b109517aa'
It works but I want to use
#set ($VOID = $velocityPortletPreferences.setValue( 'displayStyle' , 'Name of my adt'
and the asset publisher template tell me that "Name of adt is not a display style"

Thanks !