[contributions:goldenboy] /modules/css_by_path css_by_path.info css_by_path.install css_by_path.module
User: goldenboy Branch: HEAD Date: Sun, 12 Sep 2010 14:58:51 +0000 Added files: /modules/css_by_path css_by_path.info css_by_path.install css_by_path.module Log message: Initial commit of css_by_path module. 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: <code>path-stylesheets</code>, example: <code>path-stylesheets[path][media][] = path/to/css/file/to/load/when/the/path/is/triggered</code> 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: <code>path-stylesheets[node,^node*edit][media][] = path/to/css/file</code> 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. Links: http://cvs.drupal.org/diff.php?path=contributions/modules/css_by_path/css_by... http://cvs.drupal.org/diff.php?path=contributions/modules/css_by_path/css_by... http://cvs.drupal.org/diff.php?path=contributions/modules/css_by_path/css_by...
participants (1)
-
drupal-cvs@drupal.org