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.

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor 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.

        Gliffy Diagrams

          Activity

          Hide
          Gareth J Barnard added a comment -

          I think this has already been integrated so should be resolved, please see screen shot 'mdl-39839_odd.png'?

          Show
          Gareth J Barnard added a comment - I think this has already been integrated so should be resolved, please see screen shot 'mdl-39839_odd.png'?
          Hide
          Mary Evans added a comment -

          Fixed in MDL-39824

          Show
          Mary Evans added a comment - Fixed in MDL-39824

            People

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

              Dates

              • Created:
                Updated:
                Resolved: