Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-8960

Support alternative template engines

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.4.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Patch is a proof-of-concept, template files can be written in any templating language. The Smarty "include" tag is compiled to use this generic loader, so any template in the hierarchy can be replaced.

      Including smarty again from your custom templates isn't implemented, so you'll have to do that manually.

      Templates are autodiscovered using the current php include path, and the civi templates_dir array. File type is determined by its extension, so adding new template engines should just be a matter of declaring the new type in config->templateExtensions, and writing a small glue class in CRM/Core/Template/

      Note: The Twig engine depends on having that library installed, the default location is packages/symfony/vendor/twig, but you can reconfigure by declaring $config->twigDir

      See the branch https://fisheye2.atlassian.com/changelog/~br=adamw-alternative_template_engines/CiviCRM

        Attachments

          Activity

            People

            • Assignee:
              adamw Adam Wight
              Reporter:
              adamw Adam Wight
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: