Fórum

Asset publisher "$dlFileEntry.getIcon()" not working

Ra Jo Ga Cha, modificado 7 Anos atrás.

Asset publisher "$dlFileEntry.getIcon()" not working

Junior Member Postagens: 77 Data de Entrada: 19/01/17 Postagens Recentes
The icons for the attached documents aren't been shown properly, "$dlFileEntry.getIcon()" isn't working because the final URL is something like "there/are/the/icons/.png", so "$fichIconPre$dlFileEntryIcon$fichIconPost" is just concatenating URL+blank+iconformat.

This was working good in 6.1 but upgrading to 6.2 I can't get it working. I've tried with standard template for standard web contend in a standard asset publisher disabling my plugins but it's still unable to get the type of document.
thumbnail
Fernando Fernandez, modificado 7 Anos atrás.

RE: Asset publisher "$dlFileEntry.getIcon()" not working

Expert Postagens: 396 Data de Entrada: 22/08/07 Postagens Recentes
Hi Ra,

This code works well in my portlets on 6.2.

String fileIcon = "<img src="\&quot;/html/themes/control_panel/images/file_system/small/&quot;+fileEntry.getIcon()+&quot;.png\&quot;">";


I know it's not exactly the same situation as yours but I hope it can help.

Fernando
Ra Jo Ga Cha, modificado 7 Anos atrás.

RE: Asset publisher "$dlFileEntry.getIcon()" not working

Junior Member Postagens: 77 Data de Entrada: 19/01/17 Postagens Recentes
Hi Fernando,

I wasn't still able to get it that way, sounds good but by any reason it's not working for me. Finally achieved it getting a substring from the name of the file, in this case there was a customized class that eased this but probably there are Liferay core methods to reach this same solution.

Thanks for your help!