drupal_add_css, drupal_add_js does not work

前端 未结 3 2087
南笙
南笙 2021-01-15 05:15

I am using drupal_add_css() and drupal_add_js() to add CSS and JavaScript files to my Drupal site. I am doing this in a module called control so th

3条回答
  •  难免孤独
    2021-01-15 05:25

    Some pointers that might help:

    1) Place your CSS/JS script in your theme folder. 2) In your node.tpl.php file use the following:

    
    

    3) If you place your CSS in a sub folder, you will need the following code:

    4) Refresh the cache at yousite.com/admin/settings/performance

    5) Sometimes I find that I have to disable the theme at admin/build/themes and the re-enable it.

提交回复
热议问题