Template needs cgi to use it.
This commit is contained in:
parent
b0458a66db
commit
2ae8e1431f
@ -160,6 +160,7 @@ sub run {
|
|||||||
# Create the template handler object
|
# Create the template handler object
|
||||||
$self -> {"template"} = Webperl::Template -> new(logger => $self -> {"logger"},
|
$self -> {"template"} = Webperl::Template -> new(logger => $self -> {"logger"},
|
||||||
dbh => $self -> {"dbh"},
|
dbh => $self -> {"dbh"},
|
||||||
|
cgi => $self -> {"cgi"},
|
||||||
basedir => $self -> {"settings"} -> {"config"} -> {"template_dir"} || "templates",
|
basedir => $self -> {"settings"} -> {"config"} -> {"template_dir"} || "templates",
|
||||||
timefmt => $self -> {"settings"} -> {"config"} -> {"timefmt"},
|
timefmt => $self -> {"settings"} -> {"config"} -> {"timefmt"},
|
||||||
blockname => 1,
|
blockname => 1,
|
||||||
|
@ -357,7 +357,8 @@ sub set_template_dir {
|
|||||||
$self -> {"templatepath"} .= "/" unless($self -> {"templatepath"} =~ m|/$|); # templatepath must have trailing slash
|
$self -> {"templatepath"} .= "/" unless($self -> {"templatepath"} =~ m|/$|); # templatepath must have trailing slash
|
||||||
|
|
||||||
# The URL...
|
# The URL...
|
||||||
$self -> {"templateurl"} = path_join($self -> {"cgi"} -> url(-base => 1), $self -> {"templatepath"});
|
$self -> {"templateurl"} = path_join($self -> {"cgi"} -> url(-base => 1), $self -> {"templatepath"})
|
||||||
|
if($self -> {"cgi"});
|
||||||
|
|
||||||
# And the common path, if possible
|
# And the common path, if possible
|
||||||
if($self -> {"fallback"}) {
|
if($self -> {"fallback"}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user