Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Ive been adding CSS files to my theme through the theme.info file like so:
css[structure.css][name] = 'Structure styles'
css[structure.css][description] = 'Structural styles'
css[structure.css][options][weight] = '10'
I know its a strange case but I now need to add a file thats outside of the theme folder. Is it possible to add files that are in say the drupal root or in sites/all/modules?
I know there are all sorts of best practice reasons not to have files outside of the theme root but is it at least possible? Thanks
Comments
Comment #1
fubhy CreditAttribution: fubhy commentedYes. Either use relative paths or use the 'data' attribute ([options][data]) to point to a file relative to the root of your site.
Comment #2
fubhy CreditAttribution: fubhy commented