1

I have created custom block in drupal 8 using custom module. Assigned a twig template ( located in active theme ). I am passing some custom theme_settings to twig template using theme_get_setting() method. Everything works perfect. But once i clear drupal cache, The variables i am passing to twig template are getting NULL values, and only static HTML is rendered, But same theme settings are populated correctly in drupal dashboard.

harish
  • 578
  • 2
  • 8
  • 21
  • I found that if i add die() statement in my custom module, then clear cache then remove die() and then reload page then twig starts showing dynamic data. so I guesss my module is not getting loaded / executed on each page request. – harish Nov 14 '18 at 14:12

0 Answers0