- Issue created by @lazzyvn
- 🇮🇳India ravi kant Jaipur
It will very helpful if we can get list of all libraries in block config page and select library according requirement.
But alternate solution may be as -
1. Use classes and detect class in template file and attach library
2. Create select list and attache library by conditional checking in block type template file. - 🇫🇷France lazzyvn paris
Do it simple like https://www.drupal.org/project/views_attach_library →
(This works with block views)
Sometimes I just need to add my custom library in a block for example: my_custom_module/my_lib1, my_custom_module/my_lib2
it will add
$element['#attached']['library'][] = 'my_custom_module/my_lib1';
$element['#attached']['library'][] = 'my_custom_module/my_lib2';
my custom library will add custom css and custom js. it will be very usefulCan you add me to maintainer with full right, pls? I will add this feature to version 2.x