Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: PHP  |  size: 0.62 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. function amity_island_preprocess_page(&$vars, $hook) {
  3.   if (isset($vars['node'])) {
  4.    // If the node type is "blog" the template suggestion will be "page-blog.tpl.php".
  5.    $vars['template_files'][] = 'page-'. str_replace('_', '-', $vars['node']->type);
  6.    
  7.   /* if($vars['node']->type == 'landingpage'){
  8.       drupal_add_css(drupal_get_path('theme', 'amity_island') . '/landingpage.css', 'theme');
  9.       $variables['styles'] = drupal_get_css();
  10.     } */
  11.       if ($variables['node']->type == 'landingpage') {
  12.       drupal_add_css(drupal_get_path('theme', 'amity_island') . "/landingpage.css");
  13.     }
  14.   }
  15. }
  16. ?>