I need to be able to specify the scope (header, footer, etc.) of a particular library file. In my case I need to ensure that a particular file renders in .

Comments

lpeabody’s picture

Assigned: Unassigned » lpeabody
lpeabody’s picture

Assigned: lpeabody » Unassigned
tstoeckler’s picture

Category: Feature request » Support request
Status: Active » Fixed

You can specify the scope of a file (just like any other drupal_add_js/css() option) together with your files declaration. I.e.

$info['mylibrary'] = array(
  ...
  'files' => array(
    'js' => array(
      'foo.js' => array(
        'scope' => 'footer',
      ),
    ),
 ),
);

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.