-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting a theme doesn't work correctly #12
Comments
FYI - I uncommented line 457 in the Twiggy lib - method _set_template_locations. Functionality now works. // Reset template locations array since we loaded a different theme |
Thank you for your feedback. I'll look into this when I have the time. |
This was the solution for me, I changed lines ~478 :
|
even though i dont see a need to set(change) theme multiple times, reversing the array is a bad idea. array_unshift($this->_template_locations, $this->_themes_base_dir . $theme); //$this->_template_locations[] = $this->_themes_base_dir . $theme; and maybe add |
@lewispb thanks for the solution. @veljamatic I would like to know why do you think that isn't a good idea? In my case I also need more than one theme because I have different themes for the public site and private/admin site. |
I have created 2 themes - default and admin.
the following code doesn't output the admin theme:
$this->twiggy->theme('admin'); // load theme
echo $this->twiggy->get_theme(); // this returns 'admin' - which is correct
$this->twiggy->display(); // outputs default theme not admin - incorrect
The text was updated successfully, but these errors were encountered: