留言板

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

Ra Jo Ga Cha,修改在7 年前。

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

Junior Member 帖子: 77 加入日期: 17-1-19 最近的帖子
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,修改在7 年前。

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

Expert 帖子: 396 加入日期: 07-8-22 最近的帖子
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,修改在7 年前。

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

Junior Member 帖子: 77 加入日期: 17-1-19 最近的帖子
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!