- 🇮🇳India krunalunadkat Pune
Hi @senzaesclusiva,
I've found one solution by myself.
1) Add a library to bootstrap_barrio_subtheme.libraries.yml
# Custom front page custom_front_page: css: theme: css/front.css: { weight: 1000 }
2) Use hook_page_attachments_alter in .theme file
/** * Implements hook_page_attachments_alter(). */ function bootstrap_barrio_subtheme_page_attachments_alter(array &$page) { if (\Drupal::service('path.matcher')->isFrontPage()) { $page['#attached']['library'][] = 'bootstrap_barrio_subtheme/custom_front_page'; } }
Now it's working fine for the front page only.
Thanks
- Status changed to Needs review
almost 2 years ago 4:09am 2 March 2023 - 🇮🇹Italy senzaesclusiva
Many thanks @krunalunadkat for your replay and nice solution
- Status changed to Fixed
almost 2 years ago 9:26am 3 March 2023