I modified .html.twig but I don’t see changes

By default Twig templates (.html.twig) are cached, that means they are parsed down to raw PHP, so the page load faster.

You need to either 1) clean that cache, or 2) disable that cache

  1. First option is to clear cache, every time you make the change. This is done in Admin Panel of your website. https://my-aac.org/ufaq/so-where-is-this-mysterious-panel-located/
  2. Second option is to enable development mode in MyAAC, which disables that Twig cache. This will work fine on your local machine, where you make the changes, however this is not recommended on Live Server, as your website may become slow, cause it will need to reload Twig template on every page load.

To enable development mode, go to config.local.php, and change following line:

$config['env'] = 'dev'; // dev or prod

To summarize: if you are developing locally, and want to preview changes you do live, go with option 2), otherwise clear cache each time you change something as described in option 1).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.