If else statement in .DTL file !!

English! place to talk about development, programming and coding
Post Reply
IrtazaIjaz
Znuny newbie
Posts: 23
Joined: 19 Mar 2013, 14:39
Znuny Version: 3.2.1
Real Name: Irtaza Ijaz

If else statement in .DTL file !!

Post by IrtazaIjaz »

how i can put If Else statement in .dtl file....
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: If else statement in .DTL file !!

Post by jojo »

actual OTRS vesion does not support logic in the DTL files
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
IrtazaIjaz
Znuny newbie
Posts: 23
Joined: 19 Mar 2013, 14:39
Znuny Version: 3.2.1
Real Name: Irtaza Ijaz

Re: If else statement in .DTL file !!

Post by IrtazaIjaz »

But in Developers Manual :

8.1.12. set

With this tag you can set a variable in the dtl template.


<dtl set $Data{"Test"} = "Some Text">

what is this ?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: If else statement in .DTL file !!

Post by jojo »

this seems to be from a developer manual for versions < 3.0.

Actual OTRS version is 3.2.x

Please have a look at actual documentatin: http://doc.otrs.org
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
IrtazaIjaz
Znuny newbie
Posts: 23
Joined: 19 Mar 2013, 14:39
Znuny Version: 3.2.1
Real Name: Irtaza Ijaz

Re: If else statement in .DTL file !!

Post by IrtazaIjaz »

ok is there any other possibility to put some Check (like conditional statement) in .dtl file ....
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: If else statement in .DTL file !!

Post by reneeb »

You should do the checks in the .pm files, not the .dtl files.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Post Reply