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

Improvements to template searching paths (less magic)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      Check that pix icons work.

      Check page loading performance is not worse after this patch.

      Check that the template library still works.

      Add a folder "user/templates" and create a file in there "user/templates/test.mustache"

      Verify the new template is listed in the template library under the core_user subsystem.

      Show
      Check that pix icons work. Check page loading performance is not worse after this patch. Check that the template library still works. Add a folder "user/templates" and create a file in there "user/templates/test.mustache" Verify the new template is listed in the template library under the core_user subsystem.
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50085-master

      Description

      The search paths for templates is currently a bit too flexible. E.g. if you request a template core/blah from a plugin renderer it will search for plugin/blah and then core/blah. This was based on how the renderers work, but is too flexible and confusing. It will be faster and more predictable to search only in the specified.

      Also - core subsystems must be allowed to have a templates folder. This will be important to separate the reusable generic templates from ones specific to a subsystem.

      Note - this is how it is documented: https://docs.moodle.org/dev/Templates

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15