some improvement in templates
(now we have O(1) time for selecting the right html template) added: winix function: template for selecting a template for an item (file or dir) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@636 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
#include "core/misc.h"
|
||||
|
||||
|
||||
|
||||
@@ -47,8 +47,20 @@ void mount_type_is_cms(Info & i)
|
||||
i.res = system->mounts.pmount->type == Mount::cms;
|
||||
}
|
||||
|
||||
void mount_has_html_template(Info & i)
|
||||
{
|
||||
i.res = system->mounts.pmount->param[Mount::par_html_template].defined;
|
||||
}
|
||||
|
||||
|
||||
void mount_first_html_template(Info & i)
|
||||
{
|
||||
Mount::ParamRow & par = system->mounts.pmount->param[Mount::par_html_template];
|
||||
|
||||
if( par.defined && !par.arg.empty() )
|
||||
HtmlEscape(i.out, par.arg[0]);
|
||||
}
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
Reference in New Issue
Block a user