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

moved column width settings from the index.php/format.php files to theme/config.php - more flexible

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.2
    • Component/s: Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Struggeling with overlapping text in some sideblocks and with different side column width.

      One solution is to change the width range of the side columns in the theme config.

      Changes in index.php and /topics/format.php:
      // Bounds for block widths
      // more flexible for theme designers taken from theme config.php
      $lmin = (empty($THEME->block_l_min_width)) ? 160 : $THEME->block_l_min_width;
      $lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width;
      $rmin = (empty($THEME->block_r_min_width)) ? 160 : $THEME->block_r_min_width;
      $rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width;

      define('BLOCK_L_MIN_WIDTH', $lmin);
      define('BLOCK_L_MAX_WIDTH', $lmax);
      define('BLOCK_R_MIN_WIDTH', $rmin);
      define('BLOCK_R_MAX_WIDTH', $rmax);

      changes in theme/config.php:
      $THEME->block_l_min_width = 100;
      $THEME->block_l_max_width = 210;
      $THEME->block_r_min_width = 100;
      $THEME->block_r_max_width = 210;;

      /// These values define the min and max width of the left and right
      /// sieblocks in the course pages. If not set or false the standard
      /// values are taken.

      Martin, are there any reasons agains defining the sidecolumn width in the theme config.php?

        Attachments

          Activity

            People

            Assignee:
            dougiamas Martin Dougiamas
            Reporter:
            urshunkler Urs Hunkler
            Tester:
            Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jul/07