After converting tpl.php into .twig we need to test new template
How can we do that?

Comments

andypost’s picture

[22:46] chx: andypost: testing , make sure that the cache key is set to a directory so you can look at a generated php file
[22:46] chx: so, in twig.engine
[22:46] chx: 'cache' => DRUPAL_ROOT . '/compilation_cache',
[22:46] chx: 'cache' => FALSE,
[22:47] chx: remove the cache FALSE row
[22:47] chx: and then check the generated php in the compilation cache dir
[22:47] chx: that's how you can debug if there's a problem

andypost’s picture

StatusFileSize
new817 bytes

This patch enables cache, so it possible to debug compiled taemplates

andypost’s picture

StatusFileSize
new818 bytes

No reason to change 'cache' => FALSE

podarok’s picture

Status: Active » Reviewed & tested by the community

working for me

jenlampton’s picture

Title: how to test twig template? » how to debug a twig template?

updating title.

You *test* the template by putting it in the stark theme, and then flushing your site's caches. Then look at the source code.

podarok’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -code sprint drupal night ua 2012

looks like this is fixed
status + tagging

Automatically closed -- issue fixed for 2 weeks with no activity.

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)