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

Allow non-mustache templates

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.7.2
    • Themes
    • MOODLE_37_STABLE

      Scenario

      I want to use vuejs to build a front end. I want the templates to be stored in my plugins 'templates' folder. However, I cannot use a regular mustache template because vuejs uses the same curly bracket syntax as mustache does for variable interpolation.

       

      Proposed Solution

      Allow templates with any other extension than '.mustache' to be used with Moodle. The templates should be loaded un-parsed. It should also be possible to override these templates in themes in the same fashion that they can be with mustache templates.

      NOTE - we could engineer this solution further by creating a template processor plugin where it is possible to make server side processing of templates pluggable. Personally I think that would be over kill for this use case as we probably don't want any server-side processing of VueJS templates.

            Unassigned Unassigned
            brudinie guy thomas
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.