From a1326170565b9e584e5882d619da157085e1351d Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 6 May 2009 09:27:16 +0000 Subject: [PATCH] moodle_page: MDL-12212 add a couple more useful classes to body --- lib/pagelib.php | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.39.5