Foros de discusión

Asset Display

Edward A, modificado hace 6 años.

Asset Display

New Member Mensajes: 23 Fecha de incorporación: 16/06/17 Mensajes recientes
Hi!

I need some help with understanding how to use the asset display tag. I have seen some ADTs that use it, mainly the ones that come with Porygon, but I don't know yet how to include it in a view created with JSP. I just need an example, and if you could explain it, that would be great.


Any help will be greatly appreciated.
Edward A, modificado hace 6 años.

RE: Asset Display (Respuesta)

New Member Mensajes: 23 Fecha de incorporación: 16/06/17 Mensajes recientes
Ok, I was able to come up with the answer. Hopefully this example using JournalArticle will be helpful to the community.


<%
//Where "entry" is of type JournalArticle.
AssetEntry assetEntry = AssetEntryLocalServiceUtil.fetchEntry(JournalArticle.class.getName(), entry.getResourcePrimKey());
%>
<aui:col md="12">
    <liferay-ui:asset-display assetentry="<%=assetEntry %>" template="full_content"></liferay-ui:asset-display>
</aui:col>


Please consider that I am no expert in Liferay, and there might be a better approach to doing this.