当前位置: 首页>>代码示例>>PHP>>正文


PHP drupal_get_css函数代码示例

本文整理汇总了PHP中drupal_get_css函数的典型用法代码示例。如果您正苦于以下问题:PHP drupal_get_css函数的具体用法?PHP drupal_get_css怎么用?PHP drupal_get_css使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了drupal_get_css函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ninesixty_preprocess_page

/**
 * Preprocessor for page.tpl.php template file.
 */
function ninesixty_preprocess_page(&$vars, $hook)
{
    if (strpos($vars['body_classes'], ' uk ')) {
        $uk = true;
    } else {
        if (strpos($vars['body_classes'], ' academy ')) {
            $academy = true;
        }
    }
    // For easy printing of variables.
    $vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t('Home'), t('Home')) : '';
    if ($uk) {
        $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], 'uk', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
        $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], 'uk', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
    } else {
        if ($academy) {
            $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], 'academy', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
            $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], 'academy', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
        } else {
            $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
            $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
        }
    }
    $vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
    $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = ninesixty_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
}
开发者ID:nodefortytwo,项目名称:famelab,代码行数:32,代码来源:template.php

示例2: theme_block_overlay_store_form

function theme_block_overlay_store_form($form, $language)
{
    $output = "";
    $output .= drupal_get_css();
    $output .= drupal_get_js();
    $output .= '<div id="block-overlay-store" class="page-store">';
    $output .= '<div id="block-map">';
    $output .= '<img src="' . base_path() . drupal_get_path('module', 'storelocator_app') . '/images/carteBE-overlay.jpg' . '" ';
    $output .= ' class="maphilight" usemap="#Map"  />';
    $output .= '<map name="Map" id="Map">';
    $output .= '<AREA SHAPE=POLY COORDS="19,53,70,30,73,41,68,58,76,86,47,82,34,90,24,83" HREF="javascript:displayRegion(\'' . t('Province Flandre Occidentale', array(), $language) . '\');" ALT="' . t('Province Flandre Occidentale', array(), $language) . '" TITLE="' . t('Province Flandre Occidentale', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="73,40,80,41,79,36,97,43,114,41,123,33,129,52,119,55,120,67,103,90,75,87,71,73,68,57,71,49" HREF="javascript:displayRegion(\'' . t('Province Flandre Orientale', array(), $language) . '\');" ALT="' . t('Province Flandre Orientale', array(), $language) . '" TITLE="' . t('Province Flandre Orientale', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="39,94,34,91,46,82,48,85,54,86,57,87,68,90,75,88,79,89,82,92,87,87,95,90,103,91,103,96,113,94,114,101,119,100,128,111,134,109,138,111,145,113,145,121,145,132,133,135,126,140,132,141,131,149,132,158,134,171,124,167,116,166,113,160,120,157,113,151,116,140,111,132,106,129,99,132,96,129,89,130,89,134,85,129,83,117,70,115,63,109,59,100,62,94,57,92,52,85" HREF="javascript:displayRegion(\'' . t('Province de Hainaut', array(), $language) . '\');" ALT="' . t('Province de Hainaut', array(), $language) . '" TITLE="' . t('Province de Hainaut', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="141,111,150,108,165,106,173,111,182,119,187,126,194,127,194,136,189,140,184,144,191,151,172,155,169,161,171,167,172,175,168,179,165,185,159,184,158,177,159,172,155,167,158,154,159,149,149,155,149,164,140,166,135,170,128,157,129,147,130,141,124,140,132,134,142,133,144,123,142,116" HREF="javascript:displayRegion(\'' . t('Province de Namur', array(), $language) . '\');" ALT="' . t('Province de Namur', array(), $language) . '" TITLE="' . t('Province de Namur', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="195,123,211,131,215,138,222,139,221,131,231,132,233,148,219,167,216,177,214,187,225,198,222,208,200,212,189,202,166,184,171,176,171,167,167,159,171,153,184,152,183,142,193,137" HREF="javascript:displayRegion(\'' . t('Province de Luxembourg', array(), $language) . '\');" ALT="' . t('Province de Luxembourg', array(), $language) . '" TITLE="' . t('Province de Luxembourg', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="171,96,199,93,211,86,215,92,224,93,231,91,239,94,247,102,247,105,243,106,247,116,253,115,255,124,255,126,257,134,242,143,241,153,232,146,230,133,222,133,224,140,212,140,211,131,196,125,186,128,174,113,167,102" HREF="javascript:displayRegion(\'' . t('Province de Liège', array(), $language) . '\');" ALT="' . t('Province de Liège', array(), $language) . '" TITLE="' . t('Province de Liège', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="183,42,199,38,204,47,212,50,221,52,215,72,209,81,210,86,193,94,176,97,180,78,169,75,175,65,167,62,184,53,179,47,181,45" HREF="javascript:displayRegion(\'' . t('Province du Limbourg', array(), $language) . '\');" ALT="' . t('Province du Limbourg', array(), $language) . '" TITLE="' . t('Province du Limbourg', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="122,28,133,31,132,22,141,20,143,26,150,25,154,18,159,20,160,26,166,27,170,20,176,24,175,30,179,36,183,37,182,48,185,53,170,62,157,65,145,66,131,67,124,63,120,64,120,54,128,54,126,41" HREF="javascript:displayRegion(\'' . t('Province Anvers', array(), $language) . '\');" ALT="' . t('Province d\'Anvers', array(), $language) . '" TITLE="' . t('Province d\'Anvers', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="111,99,111,94,113,92,118,96,125,96,126,93,129,93,130,91,135,89,137,92,143,90,147,90,149,84,156,84,159,87,164,88,166,90,171,88,171,97,157,103,147,102,145,107,141,107,141,110,137,110,136,108,127,107,121,102,117,101,117,98,114,97,111,98,111,99" HREF="javascript:displayRegion(\'' . t('Province du Brabant wallon', array(), $language) . '\');" ALT="' . t('Province du Brabant wallon', array(), $language) . '" TITLE="' . t('Province du Brabant wallon', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="124,78,133,74,135,79,136,81,134,88,129,89,123,85" HREF="javascript:displayRegion(\'' . t('Région de Bruxelles', array(), $language) . '\');" ALT="' . t('Région de Bruxelles', array(), $language) . '" TITLE="' . t('Région de Bruxelles', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="122,62,133,67,175,65,178,64,171,74,175,76,181,76,174,96,167,90,153,89,134,90,134,80,131,76,124,79,123,84,129,89,133,89,126,95,119,95,115,93,101,95,101,88,112,86,109,80,114,74,116,72,117,58,122,65" HREF="javascript:displayRegion(\'' . t('Province du Brabant flamand', array(), $language) . '\');" ALT="' . t('Province du Brabant flamand', array(), $language) . '" TITLE="' . t('Province du Brabant flamand', array(), $language) . '">';
    $output .= '</map>';
    $output .= '</div>';
    $output .= drupal_render($form);
    $output .= '</div>';
    return $output;
}
开发者ID:singhneeraj,项目名称:fr-store,代码行数:27,代码来源:search-block-api.php

示例3: _yaml_3col_subcol_add_styles

function _yaml_3col_subcol_add_styles($vars = array())
{
    global $theme, $language;
    $base_theme_directory = str_replace('/layouts/' . $theme, '', $vars['directory']);
    $styles = drupal_get_css($vars['css']);
    // Page settings
    $styles .= _yaml_get_css_themesettings();
    // The styles array is complete, get the styled css and append the
    // IE Hacks. Additional this allows to dynamically add add packed or other iehacks.
    $styles .= "<!--[if lte IE 7]>\n";
    $styles .= '<style type="text/css" media="all">' . "\n";
    $styles .= '@import "' . base_path() . $base_theme_directory . '/yaml/core/iehacks' . (variable_get('preprocess_css', FALSE) ? '.pack' : '') . '.css";' . "\n";
    if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
        $styles .= '@import "' . base_path() . $base_theme_directory . '/yaml/core/iehacks-rtl' . (variable_get('preprocess_css', FALSE) ? '.pack' : '') . '.css";' . "\n";
    }
    $styles .= '@import "' . base_path() . $base_theme_directory . '/css/patches/patch_nav_vlist_drupal.css";' . "\n";
    $styles .= '@import "' . base_path() . $base_theme_directory . '/css/patches/patch_drupal.css";' . "\n";
    $styles .= "</style>\n";
    $styles .= "<![endif]-->\n";
    // IE 6 settings and styles.
    $styles_ie6 = _yaml_get_css_ie6_themesettings('', $base_theme_directory);
    if (!empty($styles_ie6)) {
        $styles .= "<!--[if lte IE 6]>\n";
        $styles .= '<style type="text/css" media="all">' . $styles_ie6 . "</style>\n";
        $styles .= "<![endif]-->\n";
    }
    // Return themed styles
    return $styles;
}
开发者ID:rentasite,项目名称:drupal6_sandbox,代码行数:29,代码来源:template.php

示例4: omega_preprocess_page

/**
 * Preprocessor for page.tpl.php template file.
 * The default functionality can be found in preprocess/preprocess-page.inc
 */
function omega_preprocess_page(&$vars, $hook) {
	// Prepare 960gs CSS. Fixed width is default, fluid is optional via theme-settings
  if(theme_get_setting('omega_fixed_fluid') == 'fluid') {
    $css_960 = drupal_get_path('theme', 'omega') .'/css/960-fluid.css';
  }
  else {
  	$css_960 = drupal_get_path('theme', 'omega') .'/css/960.css';
  }
  drupal_add_css($css_960, 'module', 'all');
  
  // enable/disable optional CSS files
  if (theme_get_setting('reset_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/reset.css', 'module', 'all');
  }
  if (theme_get_setting('text_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/text.css', 'module', 'all');
  }
  if (theme_get_setting('regions_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/regions.css', 'module', 'all');
  }
  if (theme_get_setting('defaults_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/defaults.css', 'module', 'all');
  }
  if (theme_get_setting('custom_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/custom.css', 'module', 'all');
  }
  // redeclare $styles
  //krumo($vars['styles']);
  $vars['styles'] = drupal_get_css();
  //krumo($vars['styles']);
} // end preprocess_page
开发者ID:ryanbayona,项目名称:Speedex,代码行数:35,代码来源:template.php

示例5: phptemplate_preprocess_page

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function phptemplate_preprocess_page(&$vars)
{
    /* Load js and css files */
    drupal_add_js(path_to_theme() . '/js/aasa.js');
    drupal_add_css(path_to_theme() . '/editor.css');
    $node = aasa_theme_current_node();
    $url = explode('/', $_GET['q']);
    /* BROWSER TITLE */
    $vars['head_title'] = $node->field_browser_title[0]['value'];
    $vars['template'] = 'admin.inc.php';
    $vars['classes'] = $node->type;
    switch ($node->type) {
        case 'front_page':
            $vars['template'] = 'front.inc.php';
            if ($url[2] != 'edit') {
                drupal_add_js(path_to_theme() . '/js/jquery-1.6.2.js');
                drupal_add_js(path_to_theme() . '/js/nivo-slider/jquery.nivo.slider.js');
            }
            break;
        case 'internal_page':
        case 'board_of_director':
        case 'education_and_event':
        case 'member_resources':
        case 'membership':
        case 'sponsorship':
        case 'the_cutting_edge':
        case 'the_cutting_edge_past':
        case 'national_conference':
        case 'regional_conferences':
        case 'contact_form':
        case 'webinars_widget':
        case 'widget_container':
        case 'widget_gallery':
            $vars['template'] = 'node.tpl.php';
            if ($url[2] != 'edit') {
                drupal_add_js(path_to_theme() . '/js/jquery-1.6.2.js');
                drupal_add_js(path_to_theme() . '/js/nivo-slider/jquery.nivo.slider.js');
            }
            break;
    }
    $vars['node_nid_widget'] = $node->nid;
    if ($url[0] == 'admin' || $url[2] == 'edit' || $url[1] == 'add' || $url[2] == 'delete') {
        $vars['template'] = 'admin.inc.php';
    }
    if ($url[0] == 'node' && $url[1] == 'add' && $url[2] == 'profile') {
        $vars['template'] = 'node.tpl.php';
        drupal_add_css(path_to_theme() . '/profile.css');
    }
    $globals = node_load(56);
    /* FOOTER TEXT*/
    $vars['title'] = $globals->title;
    $vars['field_footer_text'] = $globals->field_footer_text[0]['value'];
    $vars['node_nid_widget'] = $globals->title;
    /* Reload the javascript and css files */
    $vars['scripts'] = drupal_get_js();
    $vars['styles'] = drupal_get_css();
    $vars['active_menu'] = title_internal();
}
开发者ID:TakenCdosG,项目名称:aasa_new,代码行数:61,代码来源:template.php

示例6: seven_preprocess_page

/**
 * Override or insert variables into the page template.
 */
function seven_preprocess_page(&$vars)
{
    $vars['primary_local_tasks'] = menu_primary_local_tasks();
    $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
    // get all the current css information into an array
    $css = drupal_add_css();
    // Removing the css files of vertical tabs module because and use the seven style instead.
    unset($css['all']['module'][drupal_get_path('module', 'vertical_tabs') . '/vertical_tabs.css']);
    // now place the remaining css files back into the template variable for rendering
    $vars['styles'] = drupal_get_css($css);
}
开发者ID:Quilted,项目名称:mass_extinction,代码行数:14,代码来源:template.php

示例7: cube_preprocess_page

/**
 * Preprocessor for theme('page').
 */
function cube_preprocess_page(&$vars)
{
    // Automatically adjust layout for page with right sidebar content if no
    // explicit layout has been set.
    $layout = module_exists('context_layouts') ? context_layouts_get_active_layout() : NULL;
    if (arg(0) != 'admin' && !empty($vars['right']) && !$layout) {
        $vars['template_files'][] = 'layout-sidebar';
        $css = array('screen' => array('theme' => array(drupal_get_path('theme', 'cube') . '/layout-sidebar.css' => TRUE)));
        $vars['styles'] .= drupal_get_css($css);
    }
}
开发者ID:nimish321,项目名称:openscholar,代码行数:14,代码来源:template.php

示例8: ninesixty_preprocess_page

/**
 * Preprocessor for page.tpl.php template file.
 */
function ninesixty_preprocess_page(&$vars, $hook)
{
    // For easy printing of variables.
    $vars['logo_img'] = $vars['logo'] ? theme('image', str_replace(base_path(), '', $vars['logo']), t('Home'), t('Home')) : '';
    $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('rel' => 'home', 'title' => t('Home'), 'html' => TRUE)) : '';
    $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('rel' => 'home', 'title' => t('Home'))) : '';
    $vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
    $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = ninesixty_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
}
开发者ID:kimpepper,项目名称:drupal-base,代码行数:15,代码来源:template.php

示例9: phptemplate_preprocess_page

function phptemplate_preprocess_page(&$vars)
{
    // Add css for search
    $array_q = explode('/', $_GET['q']);
    if ($array_q[0] == 'search') {
        drupal_add_css(path_to_theme() . '/css/search.css', 'theme');
        $vars['tabs'] = null;
        // don't show search tabs
    }
    //Reload css/js. This is needed for preprocess_page since css/js is already loaded.
    $vars['styles'] = drupal_get_css();
}
开发者ID:victoriachan,项目名称:peter-blog-drupal6,代码行数:12,代码来源:template.php

示例10: precision_process_html

/**
 * Implementation of template_process_html().
 */
function precision_process_html(&$variables, $hook)
{
    // Check if overlay is activated.
    if (theme_get_setting('precision_show_overlay')) {
        // Extract and put back the body classes.
        $variables['classes_array'][] = 'show-grid';
        $variables['classes'] = implode(' ', $variables['classes_array']);
        // Add the overlay css to the page.
        $styles = drupal_add_css(drupal_get_path('theme', 'precision') . '/debug/debug.css');
        $variables['css'] = $styles;
        $variables['styles'] = drupal_get_css($variables['css']);
    }
}
开发者ID:nodeone,项目名称:232,代码行数:16,代码来源:template.php

示例11: _phptemplate_variables

function _phptemplate_variables($hook, $vars)
{
    // Setup theme path variable
    $vars['path'] = base_path() . path_to_theme();
    if ($hook == 'page') {
        // Menüüde genereerimine
        $vars['menu_level_1'] = theme('menu_links', menu_primary_links(1), 1);
        $vars['menu_level_2'] = theme('menu_links_2', menu_primary_links(2), 2);
        // Eemalda druapi css
        $css = drupal_add_css();
        unset($css['all']['module']['modules/system/system.css']);
        unset($css['all']['module']['modules/system/defaults.css']);
        $vars['styles'] = drupal_get_css($css);
        // Kasuta agregeeritud javascripti
        if (module_exists('javascript_aggregator') && $vars['scripts']) {
            $vars['scripts'] = javascript_aggregator_cache($vars['scripts']);
        }
        // Määra title page_title mooduli kaudu
        if (module_exists('page_title')) {
            $vars['head_title'] = page_title_page_get_title();
        }
        // Eemalda ebavajalikud tab'id
        _phptemplate_adminlogo($vars);
        // Ära näita tabe otsingus
        if (preg_match("|search/node|", $_GET['q'])) {
            $vars['show_tabs'] = false;
        } else {
            $vars['show_tabs'] = true;
        }
        // Title näitamise flag
        if (isset($vars['node']->field_hide_page_title)) {
            if ($vars['node']->field_hide_page_title[0]['value'] == 1) {
                $vars['show_title'] = false;
            } else {
                $vars['show_title'] = true;
            }
        } else {
            $vars['show_title'] = true;
        }
    } else {
        if ($hook == 'node') {
            // ...
        } else {
            if ($hook == 'block') {
                // ...
            }
        }
    }
    return $vars;
}
开发者ID:ViktorLinnasaar,项目名称:hanset,代码行数:50,代码来源:template.php

示例12: phptemplate_preprocess

function phptemplate_preprocess(&$vars, $hook)
{
    global $theme;
    // Set Page Class
    $vars['page_class'] = theme_get_setting('page_class');
    // Hide breadcrumb on all pages
    if (theme_get_setting('breadcrumb') == 0) {
        $vars['breadcrumb'] = '';
    }
    $vars['closure'] .= '
  <p id="theme-credit"><a href="http://drupal.org/project/strange_little_town">Strange Little Town</a> | ' . t('Original Designed : ') . '<a href="http://magical.nu/">Magical.nu</a> | ' . t('Drupal Ported : ') . '<a href="http://webzer.net/">Webzer.net</a></p>
  ';
    // Theme primary and secondary links.
    $vars['primary_menu'] = theme('links', $vars['primary_links'], array('class' => 'links primary-menu'));
    $vars['secondary_menu'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Set Accessibility nav bar
    if ($vars['primary_menu'] != '') {
        $vars['nav_access'] = '
    <ul id="nav-access" class="hidden">
      <li><a href="#primary-menu" accesskey="N" title="' . t('Skip to Primary Menu') . '">' . t('Skip to Primary Menu') . '</a></li>
      <li><a href="#main-content" accesskey="M" title="' . t('Skip to Main Content') . '">' . t('Skip to Main Content') . '</a></li>
    </ul>
  ';
    } else {
        $vars['nav_access'] = '
    <ul id="nav-access" class="hidden">
      <li><a href="#main-content" accesskey="M" title="' . t('Skip to Main Content') . '">' . t('Skip to Main Content') . '</a></li>
    </ul>
  ';
    }
    // Set Back to Top link toggle
    $vars['to_top'] = theme_get_setting('totop');
    if (theme_get_setting('totop') == 0) {
        $vars['to_top'] = '';
    } else {
        $vars['to_top'] = '<p id="to-top"><a href="#page">' . t('Back To Top') . '</a></p>';
    }
    // Comments count
    if (isset($vars['node']->links['comment_comments'])) {
        if ($vars['teaser']) {
            $all = comment_num_all($vars['node']->nid);
            $vars['comments_count'] = format_plural($all, '1 comment', '@count comments');
        }
    }
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
}
开发者ID:szczym,项目名称:tutturu,代码行数:48,代码来源:template.php

示例13: zen_variables

/**
 * The Zen theme allows its subthemes to have their own template.php files
 * The only restriction with these files is that they cannot redefine any of the
 * functions that are already defined in Zen's main template.php file.
 *
 * Also remember that the "main" theme is still Zen, so your theme functions
 * should be named as such:
 *  theme_block()  becomes  zen_block()
 *  theme_feed_icon() becomes zen_feed_icon() as well
 *
 * Additionally, it is not possible for subthemes to redefine regions.
 *
 * For a subtheme to add its own variables, use the function name
 *   zen_variables($hook, $vars)
 */
function zen_variables($hook, $vars)
{
    $vars['subtheme_directory'] = path_to_subtheme();
    switch ($hook) {
        case 'page':
            // add main Zen styles
            drupal_add_css($vars['directory'] . '/layout.css', 'theme', 'all');
            drupal_add_css($vars['directory'] . '/icons.css', 'theme', 'all');
            drupal_add_css($vars['directory'] . '/zen.css', 'theme', 'all');
            drupal_add_css($vars['directory'] . '/print.css', 'theme', 'print');
            // then load the overrides for the above css
            $vars['css'] = drupal_add_css($vars['subtheme_directory'] . '/overrides.css', 'theme', 'all');
            $vars['styles'] = drupal_get_css();
    }
    return $vars;
}
开发者ID:naryga,项目名称:alm-familyfellowship-com,代码行数:31,代码来源:template.php

示例14: pechi_preprocess_page

/**
 * Preprocessor for page.tpl.php template file.
 */
function pechi_preprocess_page(&$vars, $hook)
{
    global $language, $user;
    // For easy printing of variables.
    $vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t('Home'), t('Home')) : '';
    $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
    $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
    $vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
    $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = pechi_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
    drupal_add_js(drupal_get_path('theme', 'pechi') . '/js/pechi.js');
    // Remove sidebars if disabled e.g., for Panels
    if (!$vars['show_blocks']) {
        $vars['sidebar_first'] = '';
        $vars['sidebar_last'] = '';
    }
    // Add to array of helpful body classes
    $body_classes = explode(' ', $vars['body_classes']);
    // Default classes
    $body_classes[] = $language->prefix;
    if (isset($vars['node'])) {
        $body_classes[] = $vars['node'] ? 'full-node' : '';
        // Full node
        $body_classes[] = $vars['node']->type == 'forum' || arg(0) == 'forum' ? 'forum' : '';
        // Forum page
    } else {
        $body_classes[] = arg(0) == 'forum' ? 'forum' : '';
        // Forum page
    }
    if (module_exists('panels') && function_exists('panels_get_current_page_display')) {
        // Panels page
        $body_classes[] = panels_get_current_page_display() ? 'panels' : '';
    }
    $body_classes = array_filter($body_classes);
    // Remove empty elements
    $vars['body_classes'] = implode(' ', $body_classes);
    // Create class list separated by spaces
    $vars['body_id'] = 'pid-' . strtolower(preg_replace('/[^a-zA-Z0-9-]+/', '-', drupal_get_path_alias($_GET['q'])));
    // Add a unique page id
    if (module_exists('uc_product') && uc_product_is_product((int) $vars['node']->nid)) {
        // Kill the page title to surface our own.
        $vars['title'] = NULL;
    }
}
开发者ID:rmontero,项目名称:dla_ecommerce_site,代码行数:49,代码来源:template.php

示例15: phptemplate_preprocess_page

function phptemplate_preprocess_page(&$vars)
{
    // get rid of all module css unless it's admin menu
    $css =& $vars['css'];
    foreach ($css['all']['module'] as $key => $value) {
        if (!preg_match('/admin_menu/', $key)) {
            unset($css['all']['module'][$key]);
        }
    }
    // get rid of all print css
    unset($css['print']);
    // reset the styles
    $vars['styles'] = drupal_get_css($css);
    // add title to breadcrumb
    $icon = uiphone_get_menu_icon($_REQUEST['q']);
    $vars['breadcrumb'] .= '<span class="nav-title"><span class="nav-title-icon">' . $icon . '</span><span class="nav-title-text">' . $vars['title'] . '</span></span>';
}
开发者ID:upei,项目名称:drupal6-cms,代码行数:17,代码来源:template.php


注:本文中的drupal_get_css函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。