Download & Extend

Stylesheets by Path

Stylesheets by Path provides a mechanism to define stylesheets to be loaded when a specified path or alias is triggered.
The module is intended to be used by theme developers because it operates with the theme's .info file.
It provides a new property: path-stylesheets, example:

path-stylesheets[path][media][] = path/to/css/file/to/load/when/the/path/is/triggered

The module doesn't provide any configuration interface, which means it works immediately after enabling it.

I used http://api.drupal.org/api/function/drupal_match_path/6 to trigger the stylesheets. This function (with a little more work) will bring greater flexibility in the choice of the trigger.
Example:

path-stylesheets[node,^node*edit][media][] = path/to/css/file

The above rule will insert the CSS file in all node and node/* pages but it will not include the file for node editing pages.

This project is sponsored by Media Group Srl.

Downloads

Version Downloads Date Links
6.x-0.2-alpha1 tar.gz (7.24 KB) | zip (8.07 KB) 2010-Sep-13 Notes

Project Information


Maintainers for Stylesheets by Path

  • goldenboy - 1 commit
    last: 2 years ago, first: 2 years ago

Issues for Stylesheets by Path

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants
nobody click here