Drupal 8 - template changes

Submitted by superadmin on Sun, 12/13/2015 - 14:24

By default templates are compiled and stored in memory. Any template changes will not be reflected until the cache is rebuilt(drush rebuid) which is not workable in a development environment.

To have the template files recompiled when they are changed, debugging must be enabled in the twig engine. This can be done either using Drupal console or sites/defualt/services.yml. If you don't have services.yml you can create it by copying sites/defualt/default.services.yml to sites/defualt/services.yml and changing the following:

    debug: false


    debug: true

Don't forget to rebuild the cache one last time.


For more information see https://www.drupal.org/node/1903374

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.