Attach an asset library to a specific page in drupal 8/9

In order to attach a library to every page on site, you can specify the library in THEMENAME.info.yml file for example custom theme simple.info.yml file. The hook_page_attachments_alter function is used to attach an asset library to a specific page in drupal8/9.
copy-icon
copy-icon
copy-icon
copy-icon

Comments

Authors

Read Next