Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14306

The course category hierarchy should be reflected in CSS classes on the body tag

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9
    • 2.0
    • Themes
    • None
    • MOODLE_19_STABLE
    • MOODLE_20_STABLE

    Description

      If a course is within a category, that should be reflected in the CSS classes to allow it to be styled appropriately. The category id number could be used, combined with some text e.g. "category-1" and added as a class to the body tag.

      If a course is nested within one or more categories, then all of them should be added to the body tag as classes. To ensure that the CSS cascade works properly the designer should ensure that the CSS for the lower level categories comes later than the higher categories (assuming that you wish them to override).

      This would make it much easier to make subtle style changes via categories. We're currently trying to theme over a hundred departments, which mostly involves just changing a prominent header image and have implemented something similar just by adding PHP code to the header.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            bawjaws David Scotson
            Huong Nguyen, Bas Brands, Mathew May
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              24/Nov/10