Message Boards

Change display order of related assets in webcontent display

Jürgen Untch, modified 2 Years ago.

Change display order of related assets in webcontent display

New Member Posts: 21 Join Date: 11/14/19 Recent Posts

I have a requirement to change the display order of related assets in a webcontent display. It seems this feature is still missing in Liferay 7.2+

 

Where can I inspect the Basic Web Content Freemarker Template (best would be a github link) to understand the logic behind the display order of related assets?

 

Thanks.

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Change display order of related assets in webcontent display

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

You can find the Basic Web Content Template in the global scope (use the scope selection compass and "My Sites" as administrator to get there). However, it won't help solving your problem: I'll copy it here:

${content.getData()}

E.g. "related content" is rendered elsewhere.

In my experience it's rendered in order of creation of the relationship, but from the top of my head I can't tell you where. You might want to grep the source code for "related" and see if you can find the needle in the haystack. Worst solution would be to remove the relationships and recreate them in the desired order through the API. Unless you want different orders in different places.