mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 08:43:31 +02:00
fixes #2345 create piwigo standard pages
create new theme standard pages with tpl, css, js and images update backend to handle pages add config use_standard_pages on update set config to false, on install set config to true add standard pages to no be ingored in git
This commit is contained in:
@@ -181,10 +181,21 @@ class Template
|
||||
*/
|
||||
function set_theme($root, $theme, $path, $load_css=true, $load_local_head=true, $colorscheme='dark')
|
||||
{
|
||||
$this->set_template_dir($root.'/'.$theme.'/'.$path);
|
||||
|
||||
$themeconf = $this->load_themeconf($root.'/'.$theme);
|
||||
|
||||
// We loop over the theme and the parent theme, so if we exclude default,
|
||||
// standard pages can't get the header to load the html header
|
||||
if (
|
||||
'default' != $theme
|
||||
and in_array(script_basename(), array('identification', 'register', 'password'))
|
||||
and (($themeconf['use_standard_pages'] ?? false) or conf_get_param('use_standard_pages', false))
|
||||
)
|
||||
{
|
||||
$theme = 'standard_pages';
|
||||
}
|
||||
|
||||
$this->set_template_dir($root.'/'.$theme.'/'.$path);
|
||||
|
||||
if (isset($themeconf['parent']) and $themeconf['parent'] != $theme)
|
||||
{
|
||||
$this->set_theme(
|
||||
|
||||
Reference in New Issue
Block a user