RE: RE: Link to the current collection item

Olaf Kock, modified 3 Years ago. New Member Posts: 5 Join Date: 8/14/22 Recent Posts

Hi!

I need help in a display dynamic collection issue. I've a simple collection 'Articles' (fields: title, image, body) and want to display it on a page. It must be a grid with 1 row and 3 columns each column contain a Article title, small image from the article and a link to the current article.

From the tutorial https://learn.liferay.com/dxp/latest/en/site-building/displaying-content.html I understand that can use: Asset Publisher or Collection Display, but both are not quite suitable for me:

  • Asset Publisher - there is no grid template out of the box and it doesn't display an image from the article. But, it has a link, that display an article.
  • Collection Display - has a various ways to display items, including a grid. But, how to set a link to the current article? Mapping links manually is not a sollution, because it's a dynamic collection.

Any ideas how to deal with it? 

thumbnail
Olaf Kock, modified 3 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

These days (in 7.4), you likely want​​​​​​​ to go with Collection Displays. I'm not aware of any limitation and it should provide a link to the article as well.

For AssetPublisher, you can build a Widget Template to achieve anything, but I strongly prefer UI mapping over template writing.

Olaf Kock, modified 3 Years ago. New Member Posts: 5 Join Date: 8/14/22 Recent Posts

Hi, Olaf! Thank you for your answer! But I didn't quite understand how to setup a link to the current article. What to choose in th e drop-down list?


 

thumbnail
Olaf Kock, modified 3 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

In your screenshot, the button has a "Mapping", and a "Link" tab. Under "Link" you can map the URL to the article's display page


​​​​​​​

Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 8/14/22 Recent Posts

Hi! I know about this, but as I said: Mapping links manually is not a sollution, because it's a dynamic collection.