Hello, I am creating a new theme in moodle 1.9 for a client and need clarification on how to reference the $CFG variable from a functions.php file included in my theme.
One function, for instance, generates a language switcher based on the current language. The $CFG variable is required to specify the directory to find the image for the button.
Adding
require (../../config.php)
To the functions.php file resulted in the header being printed twice, and other flaws. So how do I reference $CFG?