allow to use multiple directories in html and txt templates

remove from the config:
templates_dir, templates_dir_default, txt_templates_dir, txt_templates_dir_default

add to the config:
html_templates_dirs - a list of directories with html templates
txt_templates_dirs - a list of directories with txt templates

We search from the last directory to the first one.
This commit is contained in:
2026-06-21 01:59:32 +02:00
parent 9e1a3e336b
commit d35854691c
6 changed files with 33 additions and 26 deletions
+8 -6
View File
@@ -4,8 +4,8 @@
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2022, Tomasz Sowa
/*
* Copyright (c) 2008-2026, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -186,11 +186,13 @@ public:
// default: 3
size_t fcgi_cannot_create_request_delay;
std::wstring templates_dir;
std::wstring templates_dir_default; // html templates from winix
// html templates directories
// by default a file from the last directory is chosen
std::vector<std::wstring> html_templates_dirs;
std::wstring txt_templates_dir;
std::wstring txt_templates_dir_default; // txt (notifications) templates from winix
// txt (notifications) templates directories
// by default a file from the last directory is chosen
std::vector<std::wstring> txt_templates_dirs;
// prefix and postfix for functions templates
// default: