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

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10