Create a new environment variable using LDAP parameters
Alexis HAUSER <[email protected]> Thu, 14 May 2020 17:10:59 +0200 (CEST)
| Newsgroups | gmane.comp.otrs.user |
|---|---|
| Message-ID | <1253304680.12859622.1589469059095.JavaMail.zimbra@imt-atlantique.fr> |
--===============6208898277981808105==
Content-Type: multipart/alternative;
boundary="=_39adeccc-436c-4b78-9ef8-23099b1cb620"
--=_39adeccc-436c-4b78-9ef8-23099b1cb620
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Hi,
I found out that it was possible to modify Layout.pm to create a new environment variable.
For example, it's possible to create a new variable called "New Variable" :
$Self->{NewVariable} = $ConfigObject->Get('DefaultTheme');
And call it inside a .tt template file using :
[% Env('NewVariable') %]
I would like to get a LDAP parameters to define it there, in the Layout.pm
This parameter is defined in Config.pm as "UserEntity", which is actually a parameter in our LDAP that we display on a ticket. What should I do to create a new variable containing it's value ?
It seems it's not contained inside a ConfigObject but somewhere else...
Regards
--=_39adeccc-436c-4b78-9ef8-23099b1cb620
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div>Hi,<br data-mce-bogus=3D"1"></div><div><br =
data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><div>I found=
out that it was possible to modify Layout.pm to create a new environment v=
ariable.<br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div>=
<div>For example, it's possible to create a new variable called "New Variab=
le" :</div><div>$Self->{NewVariable} =3D $ConfigObject->Get('DefaultT=
heme');<br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><=
div>And call it inside a .tt template file using :<br data-mce-bogus=3D"1">=
</div><div>[% Env('NewVariable') %]<br data-mce-bogus=3D"1"></div><div><br =
data-mce-bogus=3D"1"></div><div>I would like to get a LDAP parameters to de=
fine it there, in the Layout.pm<br data-mce-bogus=3D"1"></div><div>This par=
ameter is defined in Config.pm as "UserEntity", which is actually a paramet=
er in our LDAP that we display on a ticket. What should I do to create a ne=
w variable containing it's value ?<br data-mce-bogus=3D"1"></div><div>It se=
ems it's not contained inside a ConfigObject but somewhere else...</div><di=
v><br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><div>R=
egards<br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><d=
iv><br data-mce-bogus=3D"1"></div></div></body></html>
--=_39adeccc-436c-4b78-9ef8-23099b1cb620--
--===============6208898277981808105==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/mailman/listinfo/otrs
--===============6208898277981808105==--