2

I'm using Liferays Application Display Templates to render a set of web contents the way I like (which is working quite fine). Below you find my ADT code to list all news.

<table>
    <#list entries as entry>

        <#assign published = entry.getPublishDate()>
        <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />

        <tr>
            <td>${published?string["dd.MM.yyyy"]}</td>
            <td><a href="${viewURL}">${entry.getTitle(locale)}</a></td>
        </tr>
    </#list>
</table>

Now the question I have is how can I customize the actual web content and not just the list of contents? Once I chose one entry to see the full web content using my rendered link I always get a default view with a default headline and some social network buttons and stuff. Is there a way to customize this view as well?

I'm using Liferay 6.2.

Thanks for your help and regards. Sebastian

1 Answers1

2

The question implies we're dealing with Asset Publisher portlet customization.

Liferay 6.2 supports customization of the asset list either with ADTs (ie. Freemarker or Velocity templates) or custom display styles (ie. JSPs).

While the support for asset list customization is excellent, Liferay 6.2 doesn't support ADTs or display styles for the asset details. The detail is always rendered by full_content.jsp.

If you need more control of the HTML output for asset detail (title, back link etc.), you have to hook the JSP (full_content.jsp). For general info on JSP hooks, see Overriding Web Resources in the Developer's Guide.

Please note that by hooking this JSP, you'll be overriding the detail view for all Asset Publisher instances in your portal. It's always helpful to think twice, whether the hook is necessary and if it's worth it at all.

Regarding the social network buttons and stuff - this can be configured in Asset Publisher configuration (see Display tab).

Tomas Pinos
  • 2,812
  • 14
  • 22
  • Your right, Asset Publisher is the portlet of choise. Using a hook is not the way I want to go. Seems a little to much overhead and likly would affect my other portal instances. So I'll just try to adjust the look using CSS. thanks for your help. – Sebastian Sommerfeld Oct 20 '15 at 14:20
  • That's a pragmatic decision I agree with. You're welcome. – Tomas Pinos Oct 20 '15 at 14:24