This forum is for assistance with theme development.

Adding file with preprocess_html to specific page

Hi all

I've managed to create a snippet that adds a JS file into the footer, works well.
The problem is, I only want this JS snippet to load on a certain page, wondering if I can add a simple if statement some how?

function theme1_preprocess_html(&$vars) {
  drupal_add_js(path_to_theme() . '/js/script.js', array(
    'group' => JS_THEME,
    'preprocess' => TRUE,
    'scope' => 'footer',
    'weight' => '999',
      )
  );
}

Something like this maybe?

Corolla - How to fix header or primary menu or superfish menu

I'm using Corolla "7. x-3.0-rc1+2-dev", I want to fix header or primary menu or Superfish menu when the user scrolls the page vertically.

Best alternative to the color module?

I'm giving my client the ability to change the color scheme of his theme, and I can't seem to figure out how to do this. The color module seems to be outdated, and I'm not able to figure out how to specify custom regions, like set the background of the navigation region. I want to apply custom colors to any number of various elements and regions.

Can anyone point me in the right direction on how to accomplish this?

how to create page template like wordpress

Hi
I want to create page template in drupal like as wordpress Page_Templates
please suggest me how can we create page template in drupal and how to assign that template to content.

Thanks

Easy theme to customize?

I'm looking for a theme that looks good and modern but isn't to complexed. I've build my own theme that I'm using at the moment but I've gotten a bit tired of it and wan't to try new perspectives.

What I wan't is a basic theme that just uses

  • template.php
  • html.tpl.php
  • node.tpl.php
  • page.tpl.php
  • theme.info
  • style.css

No fancy JavaScript or anything like that.

duplicate post please delete

Duplicate post please delete

Pages

Subscribe with RSS Subscribe to RSS - Theme development