@ -5,7 +5,7 @@
*/
/*
* Copyright ( c ) 2008 - 20 18 , Tomasz Sowa
* Copyright ( c ) 2008 - 20 2 1, Tomasz Sowa
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
@ -46,7 +46,8 @@ namespace TemplatesFunctions
{
size_t pat_index ; // main index pattern
size_t pat_index_raw ; // pattern for a raw content
size_t pat_index_generic ; // generic index pattern, without any css-site styles, only main css (uikit)
size_t pat_index_raw ; // pattern for a raw content (raw content without html, body markup)
size_t pat_err_404 ; // 404 error
size_t pat_err_per_denied ; // permission denied error
@ -964,6 +965,7 @@ using namespace TemplatesFunctions;
ezc_blocks . Clear ( ) ;
pat_index = patterns . Add ( config - > templates_index ) ;
pat_index_generic = patterns . Add ( config - > templates_index_generic ) ;
pat_index_raw = patterns . Add ( config - > templates_index_raw ) ;
pat_err_404 = patterns . Add ( L " err_404.html " ) ; // !! IMPROVE ME name to the config
pat_err_per_denied = patterns . Add ( L " err_per_denied.html " ) ; // !! IMPROVE ME name to the config
@ -1031,6 +1033,11 @@ using namespace TemplatesFunctions;
index = patterns . Get ( pat_index , TemplatesFunctions : : locale . GetCurLang ( ) ) ;
}
else
if ( template_name = = config - > templates_index_generic )
{
index = patterns . Get ( pat_index_generic , TemplatesFunctions : : locale . GetCurLang ( ) ) ;
}
else
if ( template_name = = config - > templates_index_raw )
{
index = patterns . Get ( pat_index_raw , TemplatesFunctions : : locale . GetCurLang ( ) ) ;
@ -1058,9 +1065,9 @@ using namespace TemplatesFunctions;
Ezc : : Pattern * index = 0 ;
if ( ( cur - > request - > function = = & functions - > fun_cat | | cur - > request - > function = = & functions - > fun_run ) & & ! cur - > request - > last_item - > html_template . empty ( ) )
if ( ! cur - > request - > html_template . empty ( ) )
{
index = SelectIndexPattern ( cur - > request - > last_item- > html_template) ;
index = SelectIndexPattern ( cur - > request - > html_template) ;
}
else
{