Author Topic: loop  (Read 1596 times)

0 Members and 1 Guest are viewing this topic.

n0r3k

  • Guest
loop
on: Wed, 15. February 2006 - 19:07:59
Code: [Select]
<tmpl_if name="DOCUMENT" value="2">
<tmpl_if name="items_loop">
  <tmpl_loop name="items_loop">    // this doesn`t work

  <tmpl_include name="d_service_print_wp_head.html">
//ONLY this file needs loop but all section can`t work properly if only yhis file is looped
  <tmpl_if name="item_rev_type" value="C">
  <tmpl_include name="d_service_print_wpc.html">       
  </tmpl_if>

  <tmpl_if name="item_rev_type" value="L">
  <tmpl_include name="d_service_print_wpl.html">
  </tmpl_if>

  <tmpl_if name="item_rev_type" value="N">
  <tmpl_include name="d_service_print_wpn.html">
  </tmpl_if>

  <tmpl_if name="item_rev_type" value="T">
  <tmpl_include name="d_service_print_wpt.html">
  </tmpl_if>
  <p style="page-break-after:always"></p>

  </tmpl_loop>
</tmpl_if>
</tmpl_if>

if all code form all files were in one file, anything would work. was working till I`ve put all code in seperate files. is there any feature, that allows something like this code ?

maybe nested loops would fix the problem ? if I put one loop in this file and another loop in place, that it has to be in.?
Last Edit: Mon, 24. July 2006 - 16:27:07 by ClausVB

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
loop
Reply #1 on: Wed, 15. February 2006 - 19:15:37
I do not fully understand what you want to accomplish.

Here 2 examples of (nested) loops, that might help:
TMPL_LOOP and TMPL_IF
1:N - 1 User, N Posts - Nested loops

Regards,
Claus
Last Edit: Wed, 15. February 2006 - 19:16:39 by ClausVB