--- /lib/Apache/Gallery.orig.pm 2010-12-17 08:40:14.000000000 +0100 +++ /lib/Apache/Gallery.pm 2010-12-17 08:40:07.000000000 +0100 @@ -340,7 +340,8 @@ $dirtitle =~ s/_/ /g if $r->dir_config('GalleryUnderscoresToSpaces'); $tpl_vars{FILES} .= - $templates{directory}->fill_in(HASH=> {FILEURL => uri_escape($fileurl, $escape_rule), + $templates{directory}->fill_in(HASH=> {%tpl_vars, + FILEURL => uri_escape($fileurl, $escape_rule), FILE => $dirtitle, } );