Thread HTML::Template include: tmpl-file via parameter festlegen (21 answers)
Opened by styx-cc at 2006-07-07 19:14

styx-cc
 2006-07-10 02:41
#8256 #8256
User since
2006-05-20
533 Artikel
BenutzerIn

user image
Hallo, hab wieder ein Problem, was hier ganz gut reinpasst und will das Forum ja nich zuspammen :-)

Also, ich hab folgendes versucht:

Code: (dl )
1
2
3
4
5
6
7
8
9
my $page = param('p');

my $tmpl = HTML::Template::Compiled->new(filename => '../templates/main.tmpl');

my %content = ();
my @pages = qw(home me friends hobbys blog gb snippets projekte linktips impressum);
%content = map { getkey($_) => "$_.tmpl" } @pages;

$tmpl->param(content => "../templates/$content{$page}");



Allerdings sagt er bei:
Code: (dl )
%content = map { getkey($_) => "$_.tmpl" } @pages;


Undefined subroutine &main::getkey called at ...

Aber ich hab das so von hier uebernommen...

Mfg
Pörl.

View full thread HTML::Template include: tmpl-file via parameter festlegen