Hey everyone, playing catch up on posts here, but have a question of my own.
I have my Moodle Themes I'm developing in 2.2 and I'm trying to work out how to automatically echo the top level category name in the header of my theme.
I have found the following threads:
- http://moodle.org/mod/forum/discuss.php?d=42882 - Moodle 1.9 specific and I've tried the method outlined here, no luck.
- http://moodle.org/mod/forum/discuss.php?d=181702 - this question was also about 1.9, though it was ambiguous in the discussion and Mary replied very helpfully with some Moodle 2 stuff, but I just can't figure out how to override the renderer to show the category name. I've done plenty with overriding the renderer in the custom menu...
- http://moodle.org/mod/forum/discuss.php?d=181998 - is an copy of the previous post in a different forum.
So at the moment I have a mock-up:
Made using this code:
As you can see I have just written the "Department of Something Or Other" in manually as I play around. I want this to show the top level category that the course is in (not whichever sub-category it happens to be in).
If I come up with a solution before someone else, I will post it here.