Skip to content

Commit

Permalink
Adding drupal var for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh committed Sep 28, 2017
1 parent 31d3ced commit fbedec2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kalastatic.module
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
use Symfony\Component\Finder\Finder;
use Symfony\Component\Yaml\Parser;

/**
* Implements hook_preprocess().
*/
function kalastatic_preprocess(&$vars) {
// Add a global flag to indicate it is rendering in a Drupal context. This is
// needed for our templates to be shared between Drupal and Kalastatic.
$vars['drupal'] = TRUE;
}

/**
* Implements hook_library_info_build().
*/
Expand Down

0 comments on commit fbedec2

Please sign in to comment.