Moodle

remove the need to specify the themename from layout description

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Themes
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

at present you have to do:
'base' => array(
'theme' => 'newtheme',
'file' => 'general.php',
'regions' => array(),
),

we actually know in which theme we are, so we may add the 'theme' on the fly using current theme name when loading the theme config

Benefit: it will be easier to duplicate/modify themes

Activity

Hide
Sam Hemelryk added a comment -

Hi Petr,

I have attached a patch that removes the need to set 'theme' for each layout.

With this patch if theme hasn't been set then Moodle checks the current theme then its parents for first layout file it finds named as the layout has requested.

Let me know what you think.

Cheers
Sam

Show
Sam Hemelryk added a comment - Hi Petr, I have attached a patch that removes the need to set 'theme' for each layout. With this patch if theme hasn't been set then Moodle checks the current theme then its parents for first layout file it finds named as the layout has requested. Let me know what you think. Cheers Sam
Hide
Petr Škoda (skodak) added a comment -

+1 for commit

Show
Petr Škoda (skodak) added a comment - +1 for commit
Hide
Sam Hemelryk added a comment -

Thank you for reviewing Petr: has now been commit

Show
Sam Hemelryk added a comment - Thank you for reviewing Petr: has now been commit

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: