Another weird symptom, even in the themes in which everything else works, when I try to view the pop-up help text in a form I get the same error message.
Is it perhaps to do with which layout is being called? Where is that help text called from?
Having a look at lib/outputrenderes.php now. Certainly the function comments suggests that only current and direct parent themes are looked at, but I'm not sure where the code that does that is.
David Scotson
Posts made by David Scotson
I'm trying to do some stuff with renderers, and I've hit what might be a bug, but this is new to me so I might be doing something stupid.
I've got a heirarchy of themes that goes base > bootstrap > simple > gu23, where the themes on the right inherit from the themes on the left.
I've created a renderers.php in bootstrap which inherits from core_renderer.php and that seems to be working fine.
I've also created a renderers.php in simple theme, which inherits from theme_bootstrap_core_renderer.php and which again works fine.
However, if I switch to the theme gu23 it all breaks completely and I get the message:
Fatal error: Class 'theme_bootstrap_core_renderer' not found in /var/www/gumoodle/theme/simple/renderers.php on line 4
Yet it could find that file as long as it was only one step up the hierarchy. It seems as if maybe you can only inherit code from one step up the theme hierarchy? Or is there something silly I've overlooked?
I've got a heirarchy of themes that goes base > bootstrap > simple > gu23, where the themes on the right inherit from the themes on the left.
I've created a renderers.php in bootstrap which inherits from core_renderer.php and that seems to be working fine.
I've also created a renderers.php in simple theme, which inherits from theme_bootstrap_core_renderer.php and which again works fine.
However, if I switch to the theme gu23 it all breaks completely and I get the message:
Fatal error: Class 'theme_bootstrap_core_renderer' not found in /var/www/gumoodle/theme/simple/renderers.php on line 4
Yet it could find that file as long as it was only one step up the hierarchy. It seems as if maybe you can only inherit code from one step up the theme hierarchy? Or is there something silly I've overlooked?
Thanks for that, I've been meaning to look into renderers but didn't really know where to start with it all. I'll see if I can get my head round how you've used them, looks useful.
I'm currently trying to do the same thing, but with Twitter's Bootstrap rather than Zurb's Foundation.
http://moodle.org/mod/forum/discuss.php?d=208162
I can't say I'd recommend it if you're looking for a quick and easy way to make a theme, but if you're looking for a challenge then I think we'd be able to help each other as both frameworks are broadly similar in their approach.
http://moodle.org/mod/forum/discuss.php?d=208162
I can't say I'd recommend it if you're looking for a quick and easy way to make a theme, but if you're looking for a challenge then I think we'd be able to help each other as both frameworks are broadly similar in their approach.
Well, the long term plan is to use this theme to help the Moodle HTML be more consistent, and therefore easier to theme, preferably roughly in line with the common industry patterns used in Bootstrap. But so far, apart from filing some bugs against core Moodle (a few of which have been fixed already), it's mostly been the plan to keep all changes in the theme. This sometimes takes a bit more effort but it means that a) our institution isn't diverging from core Moodle code and b) other people can try it without having to diverge from core Moodle code too much.
I'm just about to start looking at renderers which is a way to override Moodle display code from within the theme. I'm hoping to use this to rewrite the way icons, pagers and tabs look to start with. I actually know exactly zero about how this works, but someone else has done some work in this regard already, using renderers to make the HTML a bit more Bootstrappy, so I'm going to build on that:
https://github.com/stuartlamour/moodle_bootstrap/blob/master/bootstrap/renderers.php#L74
e.g. that function intercepts calls to output icon images and (sometimes) writes out different HTML. It's very neat but I'm not sure yet how widely this system is used, I'm sure there's at least some icons that are hard-coded in some other way, so there will be need for another complementary solution anyway.
regards,
dave
I'm just about to start looking at renderers which is a way to override Moodle display code from within the theme. I'm hoping to use this to rewrite the way icons, pagers and tabs look to start with. I actually know exactly zero about how this works, but someone else has done some work in this regard already, using renderers to make the HTML a bit more Bootstrappy, so I'm going to build on that:
https://github.com/stuartlamour/moodle_bootstrap/blob/master/bootstrap/renderers.php#L74
e.g. that function intercepts calls to output icon images and (sometimes) writes out different HTML. It's very neat but I'm not sure yet how widely this system is used, I'm sure there's at least some icons that are hard-coded in some other way, so there will be need for another complementary solution anyway.
regards,
dave