New templateurl variable.
This commit is contained in:
parent
84ea3c8d72
commit
b0458a66db
@ -111,6 +111,7 @@
|
|||||||
# - `{V_[templatepath]}` is replaced by the path from the base of the web
|
# - `{V_[templatepath]}` is replaced by the path from the base of the web
|
||||||
# application to the template directory (useful for image and other resource
|
# application to the template directory (useful for image and other resource
|
||||||
# paths inside the template). This will always have a trailing '/'.
|
# paths inside the template). This will always have a trailing '/'.
|
||||||
|
# - `{V_[templateurl]}` like templatepath, but including the full URL.
|
||||||
# - `{V_[commonpath]}` is replaced by the path from the base of the web
|
# - `{V_[commonpath]}` is replaced by the path from the base of the web
|
||||||
# application to the common template directory (useful for image and other resource
|
# application to the common template directory (useful for image and other resource
|
||||||
# paths inside the common template). This will always have a trailing '/'.
|
# paths inside the common template). This will always have a trailing '/'.
|
||||||
@ -355,6 +356,9 @@ sub set_template_dir {
|
|||||||
$self -> {"templatepath"} = path_join($self -> {"scriptpath"}, $self -> {"basedir"}, $self -> {"theme"});
|
$self -> {"templatepath"} = path_join($self -> {"scriptpath"}, $self -> {"basedir"}, $self -> {"theme"});
|
||||||
$self -> {"templatepath"} .= "/" unless($self -> {"templatepath"} =~ m|/$|); # templatepath must have trailing slash
|
$self -> {"templatepath"} .= "/" unless($self -> {"templatepath"} =~ m|/$|); # templatepath must have trailing slash
|
||||||
|
|
||||||
|
# The URL...
|
||||||
|
$self -> {"templateurl"} = path_join($self -> {"cgi"} -> url(-base => 1), $self -> {"templatepath"});
|
||||||
|
|
||||||
# And the common path, if possible
|
# And the common path, if possible
|
||||||
if($self -> {"fallback"}) {
|
if($self -> {"fallback"}) {
|
||||||
$self -> {"commonpath"} = path_join($self -> {"scriptpath"}, $self -> {"basedir"}, $self -> {"fallback"});
|
$self -> {"commonpath"} = path_join($self -> {"scriptpath"}, $self -> {"basedir"}, $self -> {"fallback"});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user