Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Daniel Aschauer
Image thumbnail from document and media in journalarticle abstract view
December 5, 2012 4:22 AM
Answer

Daniel Aschauer

Rank: Junior Member

Posts: 39

Join Date: October 22, 2012

Recent Posts

I have an own web content structure where I have field defined with type “Document and Media” where a want to store one (or more) images for the article.
I want to use the image later to render the abstract of the article used in the AssetPuplisher.
How can achieve this?

I know a can read out the content of a Journalarticle so to get the data from my Web Content, but can I somehow access a thumbnail of the image?
Or can I somehow store an thumbnail from the main image to the field smallimage, that is anyway used in the abstract view of an journalarticle?
Alberto Fernadez
RE: Image thumbnail from document and media in journalarticle abstract view
December 6, 2012 4:32 AM
Answer

Alberto Fernadez

Rank: Junior Member

Posts: 49

Join Date: May 6, 2009

Recent Posts

I'm interested in how to do this in 6.1 too.
I have a template that does that and works in 6.0.6 but since the API for image gallery has changed in 6.1 I no longer know how to get smallimage or customimage from a velocity template.
Luis Mas
RE: Image thumbnail from document and media in journalarticle abstract view
December 6, 2012 4:40 AM
Answer

Luis Mas

Rank: Regular Member

Posts: 146

Join Date: May 18, 2009

Recent Posts

Maybe this forum post will help you: https://www.liferay.com/es/community/forums/-/message_boards/message/12587746
Sreeraj AV
RE: Image thumbnail from document and media in journalarticle abstract view
December 7, 2012 4:17 AM
Answer

Sreeraj AV

Rank: Regular Member

Posts: 233

Join Date: April 26, 2010

Recent Posts

Daniel Aschauer:
I have an own web content structure where I have field defined with type “Document and Media” where a want to store one (or more) images for the article.
I want to use the image later to render the abstract of the article used in the AssetPuplisher.
How can achieve this?

I know a can read out the content of a Journalarticle so to get the data from my Web Content, but can I somehow access a thumbnail of the image?
Or can I somehow store an thumbnail from the main image to the field smallimage, that is anyway used in the abstract view of an journalarticle?



when u r creating a new web content you can add abstract text and image with it, which will be displayed in Asset Publisher automatically. The only thing you have to configure is to enable Abstract Display Style in Asset Publisher Setup.
Attachment

Attachments: Scope.PNG (1,517.2k)
Daniel Aschauer
RE: Image thumbnail from document and media in journalarticle abstract view
December 7, 2012 8:13 AM
Answer

Daniel Aschauer

Rank: Junior Member

Posts: 39

Join Date: October 22, 2012

Recent Posts

Thanks so far!
Currently is this what I do by now, I use the smallImage from the abstract.
What I want do achieve is that a large image added to another fields in the content is automatically resized and added as thumbnail to smallimage.
I guess I could do that by a hook on JournalArticleService? But then in some way I would have to add the generated image to the document and media libray, to make it accessible, right?
Daniel
Luis Mas
RE: Image thumbnail from document and media in journalarticle abstract view
December 11, 2012 3:01 AM
Answer

Luis Mas

Rank: Regular Member

Posts: 146

Join Date: May 18, 2009

Recent Posts

Look at thread I told before, I think it will be enough.
Jitendra Rajput
RE: Image thumbnail from document and media in journalarticle abstract view
March 1, 2013 1:30 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 858

Join Date: January 7, 2011

Recent Posts

1String thumbnailSrc = DLUtil.getThumbnailSrc(fileEntry, fileShortcut, themeDisplay);