I have a subtheme called bootstrap_subtheme
. It has a library called global-styling
. I created a custom module called telephone_alter
. In telephone_alter.module
, I have the following:
function telephone_alter_form_user_form_alter(&$form){
$form['#attached']['library'][] = 'bootstrap_subtheme/global_styling';
}
it does not load the bootstrap_subtheme
library stylesheet. I do dump($form)
and get the following:
"#attached" => array:1 [▼
"placeholders" => array:1 [▼
"form_action_p_pvdeGsVG5zNF_XLGPTvYSKCf43t8qZYSwcfZl2uzM" => array:1 [▼
"#lazy_builder" => array:2 [▶]
]
]
]
seems like the attachment isn't even grabbing it. Yes I am using the right form alter according to the api: hook_form_FORM_ID_alter() and my ID is user_form
. It does fire off, if I attach css from within my module's folder, but not my subtheme. Any help would be great! Thank you.
One more note:
my root
dir is as follows:
modules
-telephone_alter
theme:
contrib:
-bootstrap
custom:
-bootstrap_subtheme
Here is bootstrap_subtheme.libraries.yml:
global-styling:
js:
js/popper.min.js: {}
js/bootstrap.min.js: {}
js/global.js: {}
css:
component:
css/style.css: {}
dependencies:
- core/jquery
- core/drupal
bootstrap_subtheme.libraries.yml
file too