<a href="$Env{"Baselink"}Action=Contact" title="$Text{"Contact-A"}">$Text{"Contact"}</a>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# -- # Kernel/Output/Modules/Contact # -- package Kernel::Modules::Contact; use strict; use warnings; #use Kernel::Modules:Contact; #use Kernel::System::Contact; use Kernel::System::Web::InterfaceCustomer; use Kernel::Output::HTML::Layout; use vars qw($VERSION); $VERSION = qw($Revision: 1.63 $) [1]; # render AdminState.dtl $Output .= $Self->{LayoutObject}->Output( TemplateFile => 'Contact', Data => \%Param, ); 1;
2012-07-26T12:42:37 topegDa ist was grundlegend falsch. Du benutzt Variablen die du in den Paketen nicht definiert und gefüllt hast. Die Codestücke reichen nicht um mehr sagen zu können.
1 2 3 4
my $Output .= $Self->{LayoutObject}->Output( TemplateFile => 'Contact', Data => \%Param, );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {%Param};
bless( $Self, $Type );
# set debug
$Self->{Debug} = 0;
# check all needed objects
for my $Needed (qw(ParamObject DBObject LayoutObject ConfigObject LogObject)) {
if ( !$Self->{$Needed} ) {
$Self->{LayoutObject}->FatalError( Message => "Got no $Needed!" );
}
}
# hier evtl. weitere notwendige Objekte erzeugen
return $Self;
}
1
2
3
4
5
6
7
sub Run {
my ( $Self, %Param ) = @_;
my $Output = $Self->{LayoutObject}->Output(
TemplateFile => 'Contact',
Data => \%Param,
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Config">
<CVS>$Id: Contact.xml,v 1.55 2012/07/26 08:42:06 reb Exp $</CVS>
<ConfigItem Name="CustomerFrontend::Module###Contact" Required="0" Valid="1">
<Description Translatable="1">Frontend module registration for the customer interface.</Description>
<Group>Framework</Group>
<SubGroup>Frontend::Customer::ModuleRegistration</SubGroup>
<Setting>
<FrontendModuleReg>
<Description>Contacts</Description>
<NavBarName>Tickets</NavBarName>
<Title>Contacts</Title>
<NavBar>
<Description Translatable="1">Contacts</Description>
<Name Translatable="1">Contacts</Name>
<Block></Block>
<Type></Type>
<NavBar></NavBar>
<Link>Action=Contact</Link>
<LinkOption></LinkOption>
<AccessKey>l</AccessKey>
<Prio>126</Prio>
</NavBar>
</FrontendModuleReg>
</Setting>
</ConfigItem>
</otrs_config>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
# -- # Kernel/Modules/Contact.pm # -- package Kernel::Modules::Contact; use strict; sub new { my ( $Type, %Param ) = @_; # allocate new hash for object my $Self = {%Param}; bless( $Self, $Type ); # set debug $Self->{Debug} = 0; # check all needed objects for my $Needed (qw(ParamObject DBObject LayoutObject ConfigObject LogObject)) { if ( !$Self->{$Needed} ) { $Self->{LayoutObject}->FatalError( Message => "Got no $Needed!" ); } } # -- sub Run { my ( $Self, %Param ) = @_; } # build output $Output .= $Self->{LayoutObject}->Output( TemplateFile => 'Contact', Data => \%Param, ); } 1;
1 2 3 4 5 6 7 8 9 10
# -- sub Run { my ( $Self, %Param ) = @_; # build output my $Output = $Self->{LayoutObject}->Output( TemplateFile => 'Contact', Data => \%Param, ); return $Output; }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# --
# Kernel/Modules/Contact.pm
# --
package Kernel::Modules::Contact;
use strict;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {%Param};
bless( $Self, $Type );
# set debug
$Self->{Debug} = 0;
# check all needed objects
for my $Needed (qw(ParamObject DBObject LayoutObject ConfigObject LogObject)) {
if ( !$Self->{$Needed} ) {
$Self->{LayoutObject}->FatalError( Message => "Got no $Needed!" );
}
}
# --
sub Run {
my ( $Self, %Param ) = @_;
# build output
my $Output = $Self->{LayoutObject}->Output(
TemplateFile => 'Contact',
Data => \%Param,
);
return $Output;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
# -- # Kernel/Modules/Contact.pm # -- package Kernel::Modules::Contact; #use strict; sub new { my ( $Type, %Param ) = @_; # allocate new hash for object my $Self = {%Param}; bless( $Self, $Type ); # set debug $Self->{Debug} = 0; # check all needed objects for my $Needed (qw(ParamObject DBObject LayoutObject ConfigObject LogObject)) { if ( !$Self->{$Needed} ) { $Self->{LayoutObject}->FatalError( Message => "Got no $Needed!" ); } } return $Self; } # -- sub Run { my ( $Self, %Param ) = @_; # build output my $Output = $Self->{LayoutObject}->Output( TemplateFile => 'Contact', Data => \%Param, ); return $Output; }
2012-08-07T08:14:54 bendennWarum wird die Contact.pm nicht gefunden? (Sie liegt in dem Verzeichnis Modules)
<a href="$Env{"Baselink"}Action=Contact" title="$Text{"Contact-A"}">$Text{"Contact"}</a>