You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when it's not call $this->template->set_theme($theme) on controller,
and the configuration default theme is set to
$config['theme'] = $theme;
libraries/Template.php#L80
at line 80 will cause the problem, due to for-loop ascending nature
foreach ($config as $key => $val)
{
if ($key == 'theme' AND $val != '')
{
$this->set_theme($val); // executed at first because $config['theme'] first
continue;
}
$this->{'_'.$key} = $val; //then $config['theme_locations'] is the last statement
}
sorry for my bad english. ;-)
The text was updated successfully, but these errors were encountered:
I think that this issue still slightly exists :-( It appears that although the set_theme() call is being made, it is completley ingnored when handling the layouts.
For example, in my controller i have: $this->template->set_theme('mytheme')->set_layout('lays')->build('myview', $data);
When building, it is trying to build the layout located at "views/layouts/lays.php" instead of "themes/mytheme/layouts/lays.php" (ive altered the core to find out what file its trying to load)\
Im looking into the problem right now, but any suggestions would be greatley appreciated.
JANorman, if you look closely at the get_theme_layouts() function and _find_view_folder() Template is looking for the layout files within [themes dir]/mytheme/views/layouts/layoutfile.php. The 'views' folder inbetween the theme folder and the layouts folder isn't immediately obvious.
I found the documentation to be a bit inconsistent and had to resort to the code to work that out.
when it's not call $this->template->set_theme($theme) on controller,
and the configuration default theme is set to
$config['theme'] = $theme;
libraries/Template.php#L80
at line 80 will cause the problem, due to for-loop ascending nature
foreach ($config as $key => $val)
{
if ($key == 'theme' AND $val != '')
{
$this->set_theme($val); // executed at first because $config['theme'] first
continue;
}
$this->{'_'.$key} = $val; //then $config['theme_locations'] is the last statement
}
sorry for my bad english. ;-)
The text was updated successfully, but these errors were encountered: