Author Topic: empty loops?  (Read 1657 times)

0 Members and 1 Guest are viewing this topic.

imshealth

  • Guest
empty loops?
on: Thu, 22. July 2004 - 10:26:55
If I'm having an empty loop "$loopvar=array();", the code within <loop> and </loop> is printed once.

Is is possible to add a Flag to prevent it?
No content in var, no loop at all.


Grüße Heiko

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
empty loops?
Reply #1 on: Fri, 23. July 2004 - 15:27:02
You can check the array in PHP and use <tmpl_if>.

If empty: Loop is displayed
If not empty: Loop is not displayed

Regards,
Claus

imshealth

  • Guest
empty loops?
Reply #2 on: Sun, 25. July 2004 - 23:33:59
Quote
You can check the array in PHP and use <tmpl_if>.

If empty: Loop is displayed
If not empty: Loop is not displayed


ah, ok.

machemer :-=

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
empty loops?
Reply #3 on: Mon, 26. July 2004 - 12:03:09
Ist natürlich genau anders herum:

If empty: Loop is not displayed
If not empty: Loop is displayed