<div class="callout_header four_up">
	<div class="callout_main_text">
		<h2 class="<?php $main_text ? print 'alt' : print '';?>">
			<?php print $main_text ? $main_text : $node->field_callout_main_text[0]['value']; ?>
		</h2>
		<p>
			<?php print $body_text ? $body_text : $node->field_callout_body_text[0]['value']; ?>
		</p>
	</div>					
	<div class="callout_body">
		<h3 class="with_borders">Research Areas</h3>
		<div class="four_up_container <?php if( $active && $active != '') print 'has_active'; ?>">
			<?php foreach( range(0,3) as $idx ): ?>
				<?php $research_area = node_load( $node->field_research_area[$idx]['nid']); ?>
				<div class="image_link <?php print ($active && $active == wistar_str2class($research_area->title)) ? 'active' : 'inactive' ?>">
					<a class="off" href="/<?php print drupal_get_path_alias('node/' . $research_area->nid);?>">
						<?php print theme('imagecache', 'callout_header_four_up', $node->field_featured_research_image[$idx]['filepath']);?>
						<div class="image_label"><?php print $research_area->title ?></div>
					</a>
					<a class="on" href="/<?php print drupal_get_path_alias('node/' . $research_area->nid);?>">
						<?php print theme('imagecache', 'callout_header_four_up_desat', $node->field_featured_research_image[$idx]['filepath']);?>
						<div class="image_label"><?php print $research_area->title ?></div>
						<div class="overlay">&nbsp;</div>
					</a>
				</div>
			<?php endforeach; ?>
		</div>
	</div>						
</div>

<?php 
	if($our_science = wistar_theme_get_active('our_science')) {
		print theme('wistar_callout_header_four_up', 
			$our_science, 
			$node->field_callout_main_text[0]['value'], 
			$node->field_callout_body_text[0]['value'],
			wistar_str2class($node->title)
		); 
	}
?>
<?php print theme('breadcrumb', drupal_get_breadcrumb( )); ?>
<div class="vertical_tab_container">
	<div class="vertical_tab_elements">
		<?php print theme('wistar_vertical_tabs');?>
		<div class="content">			
			<?php print theme('wistar_content_heading', $node);?>
			<div id="node-<?php print $node->nid;?>" class="node research-area node-research-area">
				<?php if(isset($node->field_intro_text[0]['value']) && $node->field_intro_text[0]['value']): ?>
					<div class="section first no_pad">
						<p class="intro_text">
							<?php print $node->field_intro_text[0]['value'] ?>
						</p>				
					</div>
				<?php endif;?>
				<div class="section">
					<!-- stare expandable list -->
					<div class="expandable_list_container">
						<div class="expandable_list_elements">
							<ul class="expandable_list">
								<?php foreach( $node->field_topics as $idx => $topic ): ?>
									<?php $topic = node_load($topic['nid']); ?>
示例#3
0
function wistar_preprocess_search_result(&$variables){
	global $base_url;
	if(!empty($variables['result']['node'])){
		$result = $variables['result'];
		$node = $result['node'];
		$node_title = wistar_str2class($node->title);
		if($node->type == 'research_topic' || $node->type == 'glossary'){
			//add redirect
			$variables['url'] = $base_url.'/news-and-media/glossary#'.$node_title;
		}
	}
}
	});
</script>
<div class="vertical_tab_container">
	<div class="vertical_tab_elements">
		<?php print theme('wistar_vertical_tabs');?>
		<div class="content">			
			<?php print theme('wistar_content_heading', null, 'Glossary');?>
			<div class="node research-area node-research-area">
				<div class="section">
					<!-- stare expandable list -->
					<div class="expandable_list_container">
						<div class="expandable_list_elements">
							<ul class="expandable_list">
								<?php foreach( $view->result as $idx => $result ): ?>
									<li>
										<a class="anchor" href="#" name="<?php print wistar_str2class($result->node_title);?>"><?php print $result->node_title; ?><span class="icon">&nbsp;</span></a>				
										<div class="expandable_content expandable_content_multicolumn node" id="node-<?php print $result->nid ?>">
											<div class="expandable_content_inner">
												<div class="body">
													<?php print $view->render_field('field_glossary_definition_value', $idx); ?>
												</div>														
											</div>
										</div>
									</li>
								<?php endforeach; ?>
							</ul>
						</div>
					</div>
					<!-- end expandable list -->
				</div>
			</div>