Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39824 Simplification of themes
  3. MDL-39839

Change all calls to $PAGE in layout files to call a method on the renderer.

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: FRONTEND
    • Component/s: Themes
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE

      Description

      Replace all calls to $PAGE in layout files with a method of the renderer. This is so there is only one object that needs to be called that will contain all the methods required by a layout file (the output method can just call return $PAGE->bodyid for example).

      Sample layout code:

      <body id="<?php echo $OUTPUT->body_id()) ?>" 
      

      Note: Is it better to have a single call to <?php echo $OUTPUT->start_body($extraclasses) ?> IMO it's not better because the leaving the body tag in the layout files makes them look more like real html file and they display better in an IDE.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            damyon Damyon Wiese
            Participants:
            Component watchers:
            Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: