I tried like this but its not printing what i want

[% FOREACH st IN university %]
[% st.name %]
[%st.location%]
studentdata:
[% FOREACH student IN st.branch.electronics.student %]

Component type: [%+ student.name +%][%+ student.number +%]

        [% FOREACH add IN studentaddress %]

        [% FOREACH address IN add.adress %]

       [% IF adress.name==student.name && adress.number ==student.number %]

            [% st.branch.electronics.student.size %]

 [% IF st.branch.electronics.student.size==1 %]
       [% adress.address %] .
 [%ELSIF st.branch.electronics.student.size==2 %]
       [% adress.address %] ,[% adress.address %] .
 [%ELSIF st.branch.electronics.student.size==2 %]
       [% adress.address %] ,[% adress.address %]or[% adress.address %] .

 [% END %]
 [% END %]
 [% END %]
 [% END %]
 [% END %]
 [% END %]

but its not working it printing address like this

when only one student name is there then it giving exactly like this
 address1.(i didn't write full addresss)

if we have two student address it printing like this
       address1, address1.
       address2,address2.
if we have three student address it printing like this
address1, address1 or address1.
       address2, address2 or address2.
  address3, address3 or address3.

i cant understand what is the problem with this what i did mistake? can
anyone help me how to print as i want please.
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to