Fórum

Issue with Image variable in Web Content Template

thumbnail
Rajesh GR, modificado 7 Anos atrás.

Issue with Image variable in Web Content Template

Regular Member Postagens: 161 Data de Entrada: 08/02/10 Postagens Recentes
Hello All,

I have created a sample web content with structure which has repeatable text box with an Image and text fields in it. Created the below Template to display the content,

<div class="container">
#if (!$Text_Box1736.getSiblings().isEmpty())
#foreach ($cur_Text_Box1736 in $Text_Box1736.getSiblings())
<div class="col-md-6">
$cur_Text_Box1736.getData()
<div class="col-md-3"><img alt="Image" src="$cur_Text_Box1736.Image2598.getData()" /></div>
<p>$cur_Text_Box1736.Text_Box2814.getData()</p>
</div>
#end
#end
</div>

The text values of Text_Box1736 and Text_Box2814 is displaying properly for different contents first and second times but the issue is with the Images, Image2598 is displaying the same first image in all the other loops also. Even if you give different images in the 2nd and 3rd loops, it is giving me same first Image alone in all the loops.

Can somebody please check this and help me on this. Attached the required Structure for your reference.
Thirumal Reddy, modificado 7 Anos atrás.

RE: Issue with Image variable in Web Content Template

Regular Member Postagens: 216 Data de Entrada: 03/12/15 Postagens Recentes
Hi Rajesh,
which version of liferay are you using?

i think it is a bug in 6.2
to resolve this , you need to specify image field as first insted text box.
Image(+)
text box1
text box2

Thanks,
Thirumal.
thumbnail
Rajesh GR, modificado 7 Anos atrás.

RE: Issue with Image variable in Web Content Template

Regular Member Postagens: 161 Data de Entrada: 08/02/10 Postagens Recentes
Yes I m using in 6.2. Yeah it works fine If I use as you mentioned but wanted to check it is a bug or not.

Thanks for the reply Tirumal.