Forums de discussion
webcontent-template -> using thumbnails images from document-library (6.2)
Marco Walz, modifié il y a 9 années.
webcontent-template -> using thumbnails images from document-library (6.2)
New Member Publications: 13 Date d'inscription: 12/07/14 Publications récentes
Hello,
I have the use-case that I want to create a structure and template for webcontent where I can access thumbnail-images of the document-library.
Searching for this led me to following thread: https://www.liferay.com/es/community/forums/-/message_boards/message/12587746
I exactly need the solution posted by Davide N. P. Rossi. Is this still possible in Liferay 6.2? I can't add the type "document-library" in webcontent-structures. Either the functionality has been removed or I'm to silly to get it working.
I also have a question about the image-type "wcm-image". Where does the uploaded image get saved? I only see records in database with id's but I can't find the uploaded images of this type in document-library.
I just don't want to upload the same image multiple times. I want to have images in one place and access it through document-library. So it is important to have thumbnails because otherwise the whole image ( e.g. size of 5MB ) is loaded.
Please help me
Thanks
Marco
I have the use-case that I want to create a structure and template for webcontent where I can access thumbnail-images of the document-library.
Searching for this led me to following thread: https://www.liferay.com/es/community/forums/-/message_boards/message/12587746
I exactly need the solution posted by Davide N. P. Rossi. Is this still possible in Liferay 6.2? I can't add the type "document-library" in webcontent-structures. Either the functionality has been removed or I'm to silly to get it working.
I also have a question about the image-type "wcm-image". Where does the uploaded image get saved? I only see records in database with id's but I can't find the uploaded images of this type in document-library.
I just don't want to upload the same image multiple times. I want to have images in one place and access it through document-library. So it is important to have thumbnails because otherwise the whole image ( e.g. size of 5MB ) is loaded.
Please help me
Thanks
Marco
Marco Walz, modifié il y a 9 années.
RE: webcontent-template -> using thumbnails images from document-library (
New Member Publications: 13 Date d'inscription: 12/07/14 Publications récentes
Nobody out there who can provide me a statement about this topic?!?!
Ahmed bouchriha, modifié il y a 9 années.
RE: webcontent-template -> using thumbnails images from document-library (
Junior Member Publications: 55 Date d'inscription: 04/05/12 Publications récentes
Hi marco
I have tried the solution posted by Davide N. P. Rossi on LR 6.2 and it works perfectly following those steps :
add the following properties to your portal-ext.properties
Where X, Y, X1, Y1 are the sizes you want to set.
The structure code is:
The template code is:
Create the web content and it should works.
Best Regards
I have tried the solution posted by Davide N. P. Rossi on LR 6.2 and it works perfectly following those steps :
add the following properties to your portal-ext.properties
dl.file.entry.thumbnail.custom1.max.height=X
dl.file.entry.thumbnail.custom1.max.width=Y
dl.file.entry.thumbnail.custom2.max.height=X1
dl.file.entry.thumbnail.custom2.max.width=Y1
Where X, Y, X1, Y1 are the sizes you want to set.
The structure code is:
<root available-locales="en_US" default-locale="en_US">
<dynamic-element datatype="document-library" fieldnamespace="ddm" indextype="keyword" name="Imagefield" readonly="false" repeatable="false" required="false" showlabel="true" type="ddm-documentlibrary" width="">
<meta-data locale="en_US">
<entry name="label">
Documents and Media
</entry>
<entry name="predefinedValue">
</entry>
<entry name="tip">
</entry>
</meta-data>
</dynamic-element>
</root>
The template code is:
#set ($myImage = $Imagefield.getData())
<a href="$myImage" target="_blank"><img alt="" src="$myImage"></a>
<a href="$myImage" target="_blank"><img alt="" src="$myImage&imageThumbnail=1"></a>
<a href="$myImage" target="_blank"><img alt="" src="$myImage&imageThumbnail=2"></a>
<a href="$myImage" target="_blank"><img alt="" src="$myImage&imageThumbnail=3"></a>
Create the web content and it should works.
Best Regards
Marco Walz, modifié il y a 9 années.
RE: webcontent-template -> using thumbnails images from document-library (
New Member Publications: 13 Date d'inscription: 12/07/14 Publications récentes
I'm really confused. I could swear I tried to do it in this way and it didn't work.
Well, it's working now. Thanks!
Well, it's working now. Thanks!