Timeline for Best place to include javascript in a field formatter?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 29, 2016 at 12:30 | comment | added | Cool |
can we add css also in the same way? $element['#attached']['css'][] = drupal_get_path('module', 'mymodule') . '/mymodule.field.css;
|
|
Jan 10, 2012 at 19:16 | comment | added | Alex Weber | Since I was calling a theme function in the formatter_view() anyway I just moved the include js part to hook_preprocess_hook(), this is great know to know though! | |
Jan 10, 2012 at 19:14 | vote | accept | Alex Weber | ||
Jan 10, 2012 at 18:54 | history | answered | Dave Reid | CC BY-SA 3.0 |