From: tjhunt <tjhunt> Date: Wed, 6 May 2009 09:27:16 +0000 (+0000) Subject: moodle_page: MDL-12212 add a couple more useful classes to body X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a1326170565b9e584e5882d619da157085e1351d;p=moodle.git moodle_page: MDL-12212 add a couple more useful classes to body --- diff --git a/lib/pagelib.php b/lib/pagelib.php index dab145d191..134d746be0 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -629,6 +629,12 @@ class moodle_page { $this->add_body_class($this->url_to_class_name($CFG->wwwroot)); + $this->add_body_class('context-' . $this->context->id); + + if (!empty($this->_cm)) { + $this->add_body_class('cmid-' . $this->_cm->id); + } + if ($CFG->allowcategorythemes) { $this->ensure_category_loaded(); foreach ($this->_categories as $catid => $notused) {