PageDir — specify directory containing catalog pages
Specify the directory containing catalog pages. The default for this
directive is pages.
Speaking of internationalization, it can be useful to set this directive to different values, depending on current locale.
Example: Setting PageDir depending on current locale
To use a different page directory for different locales, say French and
English, help yourself with the robust Locale directive:
# Establish the default at startup PageDir english # Establish locale-dependent directories Locale fr_FR PageDir francais Locale en_US PageDir english
To fully understand the example and implicitly presented Interchange features, make sure you're familiar with internationalization and locale glossary entries.
Interchange 5.7.0:
Source: lib/Vend/Config.pm
Line 3863 (context shows lines 3863-3884)
sub parse_relative_dir {
my($var, $value) = @_;
if ($Global::NoAbsolute) {
# sanity check on filenames
if (file_name_is_absolute($value)) {
config_error('Absolute path %s not allowed in %s directive',
$value, $var)
}
if ($value =~ m#^\.\./.*\.\.#) {
config_error('Path %s outside of catalog directory not allowed in %s directive',
$value, $var)
}
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}