I have created a loop (securityLoop) that is based on a list (securityTypesLoopList).
This works well as I'm using [% LoopLabel(securityLoop) %] just fine.
The issue is, on the first question for the loop I'm not only displaying the text for LoopLabel(securityLoop), but I need to display a second (graphic) and third (text) dynamic piece based on the loop iteration.
I'll poste the short code below, but here is a rundown.
LoopIteration == 1
LoopLabel(securityLoop) shows "Local Security"
The graphic should display a picture of their uniform
The second dependent text is a description of the responsibilities of local security
LoopIteration == 2
LoopLabel(securityLoop) shows "Sherrif's Department"
The graphic should display a picture of the Sherriff's uniform
The second dependent text is a description of the responsibilities of the Sherrif's department
Here is a test piece of code I've been tinkering with.
[% Begin Unverified Perl
if (LoopIteration() == 1) {
return "Local security";
return "<img src='[%GraphicsPath()%]Security_Uniform.PNG' alt='' border='0'>";
}
elsif (LoopIteration() == 1) {
return "The sherrif";
return "<img src='[%GraphicsPath()%]Sherrif_Uniform.PNG' alt='' border='0'>";
}
End Unverified %]