Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
M. Garcia
Troubles to display the article small image with a velocity template
June 10, 2011 5:15 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

Hello,

I have trouble to display the small image (from the article "Abstract" block form) threw a VM template, using the reserved velocity variable $reserved-article-small-image-url.

In the form, you can use "Small Image URL" -- OR -- "Small Image" (upload).
I'm using the image uploader. If I use the "Small Image URL", it works. But I dont want the users to have to upload the image separately from this form (i.e. Image gallery) and then getting the URL of the image to put in that field.

The asset publisher portlet manages to display the small image.
Then when I click on "read more", and try to get the small image url in my VM template, the data contained by the variable $reserved-article-small-image-url is empty.

I already tried to revive an old similar thread that was never resolved, but I got no answer so I'm trying again ;-).
I'm using LR 6.0.6.

The article template I am using :
1$reserved-article-small-image-url
2<p><strong>$reserved-article-description.data</strong></p>
3<p>$body.data</p>
4<p class="attached_files">Fichiers joints<br/>
5#foreach ($p in $pj.getSiblings())
6<a href="$p.data">$p.data</a><br/>
7#end
8</p>
Attachment

Attachment

Attachment

Attachments: ScreenShot039.png (62.0k), ScreenShot040.png (8.0k), ScreenShot041.png (12.2k)
M. Garcia
RE: Display article small image with a velocity template
June 10, 2011 5:10 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

Subsidiary question, is there a way to disable this Abstract block (abstract text + small image) in a particular Web Content structure ?
M. Garcia
RE: Display article small image with a velocity template
June 15, 2011 2:26 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

Anyone please ?
Thomas Kevin
RE: Display article small image with a velocity template
June 15, 2011 3:23 AM
Answer

Thomas Kevin

Rank: New Member

Posts: 9

Join Date: May 5, 2011

Recent Posts

As per my suggestion, Software installed in this image.
Does not followed software expect Liferay installed from ubuntu repository and has almost standard ubuntu configuration.

please try to followed software installed configuration from ubuntu repository and has standard.


Regards
Kevin Thomas
Attune Infocom Inc
Email : contact@attuneinfocom.com
Liferay Portlet
M. Garcia
RE: Display article small image with a velocity template
June 21, 2011 8:39 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

Thomas Kevin:
As per my suggestion, Software installed in this image.
Does not followed software expect Liferay installed from ubuntu repository and has almost standard ubuntu configuration.

please try to followed software installed configuration from ubuntu repository and has standard.


Regards
Kevin Thomas
Attune Infocom Inc
Email : contact@attuneinfocom.com
Liferay Portlet


Hello,

I'm not sure about what you're saying... I installed the software from LR.com on a windows machine.
M. Garcia
RE: Display article small image with a velocity template
June 23, 2011 4:31 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

I still didn't manage to solve this issue.

$reserved-article-small-image-url works well when you enter a small image by URL, but does not work for a small image upload, in the article Abstract part of the form.

Please, what is the way to use a Small Image in a velocity template ?
Sukho D.A.
RE: Troubles to display the article small image with a velocity template
September 4, 2011 1:20 AM
Answer

Sukho D.A.

Rank: New Member

Posts: 3

Join Date: June 29, 2010

Recent Posts

Did you find the solution?, I have the same problem
M. Garcia
RE: Troubles to display the article small image with a velocity template
September 5, 2011 3:12 AM
Answer

M. Garcia

Rank: Regular Member

Posts: 107

Join Date: May 17, 2011

Recent Posts

Hey Sukho,

I've not found a solution for this issue.

Seems that if you want to be able to use $reserved-article-small-image-url, you must fill the "Small Image URL" field when adding web content (not friendly when you want to upload the image at the same time)..
If you fill in 'Small Image" field (form upload), the $reserved... will be empty.