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

Add a tool to browse templates in the current theme.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Login as admin
      Visit Site administration -> Development -> Template Library
      Click on one of the templates to see it rendered with some documentation
      Verify the search can find templates (by filename)
      Verify you can filter by component

      Add a new template somewhere (see https://docs.moodle.org/dev/User:Damyon_Wiese/Templates )
      Verify it shows up in the template library and everything works as expected.

      Show
      Login as admin Visit Site administration -> Development -> Template Library Click on one of the templates to see it rendered with some documentation Verify the search can find templates (by filename) Verify you can filter by component Add a new template somewhere (see https://docs.moodle.org/dev/User:Damyon_Wiese/Templates ) Verify it shows up in the template library and everything works as expected.
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-49650-master

      Description

      The idea is that a special comment could be added to the template that would mark it as suitable for displaying in the tool. The comment can include sample "context" data in json format so that the tool can render the template with some sample content.

      This would then allow you to view all the defined templates in a custom theme, or switch languages etc.

      This tool does not necessarily have to be in core (there are mixed opinions on dev tools in core). It can live in plugin land as long as the syntax for the comments is agreed - and added to core templates by default.

      This issue supersedes MDL-45828 (Element library).

        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