if condition in dtl file

Moderator: crythias

Locked
pokyu01
Znuny newbie
Posts: 58
Joined: 05 Aug 2010, 12:57
Znuny Version: 2.4.7

if condition in dtl file

Post by pokyu01 »

hi there,

otrs 2.4 documentation "developer manual" describes (see chapter 8.1.14) that "if" condition in "dtl"-file can be definded like this:

Code: Select all

<dtl if ($Text{"Lock"} =~ "/text/i") { $Data{"Lala"} = "Matched"; }>
How does this syntax with "else" section look like? Does it work?

thanx for assistance

kind regards

yury
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: if condition in dtl file

Post by crythias »

While it may be possible to do what you want with the .dtl, logic should really not be a part of the template. That doesn't prevent you from using javascript to do whatever you want, though.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked