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

Replace blocks_for_region call with new method block_container

XMLWordPrintable

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

      The current method is to have a specific structure in the layout file, and then call blocks_for_region inside that structure. A better way is to have a new call that writes the block container and the blocks within it. This means we can move the logic of when to show the block container into the renderer and out of the layout files:

      Sample layout code:

       
      <?php echo $OUTPUT->blocks_container('side-pre', 'aside', array('extraclass1', 'extraclass2')); ?>
      

      This would write the complete container using the specified tag type (e.g. div/aside and any additional classes).

      This also implies we move all RTL logic completely to the CSS.

      E.g. side-pre would always be rendered and the CSS would move it to the right or left depending on RTL.

            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.