I am using a custom theme in Drupal and the jquery and bootstrap version in pretty outdated. Old pages in are in that version but I want to design few new pages where I want to include the latest version of bootstrap and jQuery. Now whenever I design a new page, Drupal itself adds certain wrappers to it and includes the previous bootstrap, jQuery version in the aggregate JavaScript file. I just want it to be plain HTML and not include any other CSS/JavaScript files, or make any other modification.

I have added CSS and JavaScript files in link and script tags. Few elements also have inline CSS styles. I just want it to render as simple HTML page.

Currently this is my theme.inc file.

 foreach ($stylesheets as $stylesheet) {
   drupal_add_css($stylesheet, array('group' => CSS_THEME, 'every_page' => TRUE, 'media' => $media));

I think you're looking for hook_js_alter and hook_css_alter. Using these hooks you can remove any CSS and/or JS file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.