开发者

How to define multiple stylesheets in the Drupal 7 .info file

I would like to define multiple stylesheets in the Drupal 7 .info file. This is what I am doing:

stylesheets[all][] = support/default.css
stylesheets[all][] = support/article.css
stylesheets[all][] = support/tinydropdown.css
scripts[] = support/tinydropdown.js

The only thing that loads in this setting is the first stylesheet. The other two stylesheets and the javascript don't load. I have tried clearing the cache and reloading the theme, but it does not work for me.

What am I 开发者_JAVA技巧doing wrong?


Just came across this.

Try adding 0, 1, 2 etc

stylesheets[all][0] = support/default.css
stylesheets[all][1] = support/article.css
stylesheets[all][2] = support/tinydropdown.css


I just ran into this. See this document: https://drupal.org/node/171209

Note the note, too.

The .info file is cached. Adding or removing any styles will not be detected until the cache is cleared and the revised .info is read. (Do not confuse this with the theme registry.) You must clear the cache to see the changes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜