Created
February 25, 2017 07:04
-
-
Save DejanBelic/9c3e154ae159216cd680e9bbb5e3e139 to your computer and use it in GitHub Desktop.
Attaching library to front page in drupal 8.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_theme_preprocess_page(&$variables) { | |
if ($variables['is_front']) { | |
$variables['#attached']['library'][] = 'my_theme/googleMap'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment