How do I use conditionals in 3.x templates?

English! place to talk about development, programming and coding
Post Reply
Adan0s
Znuny newbie
Posts: 1
Joined: 09 Mar 2011, 15:00
Znuny Version: 3.0.6

How do I use conditionals in 3.x templates?

Post by Adan0s »

Hey,

I just noticed that in 3.x the <dtl if> conditionals are not anymore supported.
How do I now use if-queries in the templates?

Regards,
Adan0s
Mike_B
Moderator
Posts: 266
Joined: 12 Jan 2010, 18:16
Znuny Version: CVS HEAD

Re: How do I use conditionals in 3.x templates?

Post by Mike_B »

You shouldn't! That's the idea.
One of the issues with the conditionals was, they were very difficult to have them (unit) tested.
If you need a quick hack you can look at using an output filter, or client-side javascript.
The best solution oftentimes is however to fix it in the module layer.

--
Mike.
huntingbears.nl - @michielbeijen on Twitter
Post Reply