コード例 #1
0
ファイル: template.php プロジェクト: juancho48/drupal_6_test
function wistar_preprocess_page(&$vars) {
	jquery_ui_add(array('effects.slide'));

	if( $vars['is_front'] ) {
		$vars['homepage'] = wistar_theme_get_active('homepage');
		$vars['head_title'] = $vars['homepage']->title;

		// load up the quicktabs
		$quicktabs = quicktabs_load(1);
		$vars['quicktabs'] = theme('quicktabs', $quicktabs);

		// load the alert
		$vars['alert'] = wistar_theme_get_alert();

		// we need to re-render the js, since qt relies on it's own
		$vars['css'] = drupal_add_css();
		$vars['styles'] = drupal_get_css();
		$vars['scripts'] = drupal_get_js();

		// rebuild the less files - this sucks, but is needed beacuse of how
		// quicktabs adds the required files in a theme function
		// this shouldn't be a problem in production, since this function only builds
		// the less files if they aren't built already. Otherwise, it just modifies the
		// css array to include the built files.
		_less_build($vars, 'page');
	}

	if( isset($vars['title']) && $vars['title'] ) {
		$vars['body_classes'] .= ' ' . wistar_str2class($vars['title']);
	}
	if(isset($_SESSION['donation_form'])&&arg(0)!='give'&&arg(1)!='confirmation'){
		unset($_SESSION['donation_form']);
	}

	$node = $vars['node'];
	if ($node->type=='microsite_subpage') {
		if ($node->field_template_type[0]['value'] == 1) {
			$vars['body_classes'] .= ' microsite-subpage-fullwidth';
		}
	}
}
コード例 #2
0
ファイル: page.tpl.php プロジェクト: juancho48/drupal_6_test
<?php print theme('wistar_page_head', $head_title, $head, $meta, $scripts, $styles, $body_classes); ?>
<div id="header_container">
	<div id="header_elements">
		<?php print theme('wistar_logo');?>
		<?php print theme('wistar_social_tabs', $node);?>
	</div>
</div>					
<div id="page_container">
	<div id="page_elements">
		<div id="content_container">
			<div id="content_elements">
				<div id="main_content">
					<div class="tab_container">
						<?php print $tabs; ?>
					</div>				
					<?php print $content; ?>
				</div>
			</div>
		</div>
	</div>
</div>
<?php print theme('wistar_page_footer', $messages, $closure, true, wistar_theme_get_alert()); ?>