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

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • FRONTEND
    • 2.5
    • Themes
    • MOODLE_25_STABLE

      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.

        1. mdl-39839_odd.png
          183 kB
          Gareth J Barnard

            Unassigned Unassigned
            damyon Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.