Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_page_attachments_alter().
- */
- function mytheme_page_attachments_alter(&$attachments) {
- if (Drupal::service('path.matcher')->isFrontPage()) {
- $attachments['#attached']['library'][] = 'mytheme/library-name';
- }
- }
Add Comment
Please, Sign In to add comment