Topic: Additional Field Template Help

Hey Everyone,

I'm using CuteNews 2.0.3 and have 3 additional fields.

All three fields are images with names, NewsImage, NewsImage2, NewsImage3

The only one that is required is NewsImage.  The other two are optional.

I can get the first one to work with this code in the template.

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<div class="post-image">
  <div class="img-thumbnail"> 
    <img class="img-responsive" src="{NewsImage}">
  </div>
</div>
</div>

I can't figure out how to get the others to show when it's in use.

Any help?

Thanks
Gary

Re: Additional Field Template Help

Hey Everyone,

I'm using CuteNews 2.0.3 and have 3 additional fields.

All three fields are images with names, NewsImage, NewsImage2, NewsImage3

The only one that is required is NewsImage.  The other two are optional.

I can get the first one to work with this code in the template.

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<div class="post-image">
  <div class="img-thumbnail"> 
    <img class="img-responsive" src="{NewsImage}">
  </div>
</div>
</div>

I can't figure out how to get the others to show when it's in use.

Any help?

Thanks
Gary

Hello Gary,

try this:

[if {image-0}][img]{image-0}[/img][/if]
[if {image-1}]<img src={image-1} />[/if]
[if {image-2}]<img src={image-2} />[/if]

Re: Additional Field Template Help

Hello Gary,

try this:

[if {image-0}][img]{image-0}[/img][/if]
[if {image-1}]<img src={image-1} />[/if]
[if {image-2}]<img src={image-2} />[/if]

Thanks for the help Perry.

It ended up working, I just had to have the if statement in a complete line.  I couldn't keep the format the same.

Gary