AlkantarClanX12

Your IP : 216.73.217.128


Current Path : /var/www/clients/client1/web1/web/sites/all/themes/hawell/tpl/
Upload File :
Current File : /var/www/clients/client1/web1/web/sites/all/themes/hawell/tpl/page--portfolio.tpl.php

<?php require_once(drupal_get_path('theme','hawell').'/tpl/header.tpl.php');?>
<?php
	if (isset($node->field_page_title_background) && !empty($node->field_page_title_background))
   	{
      	$page_title_bg = $node->field_page_title_background['und'][0]['uri'];
      	$page_title_background = file_create_url($page_title_bg);
   	} else $page_title_background = '';

   	if(!function_exists('trim_text')){
   		function trim_text($input, $length, $ellipses = true, $strip_html = true) {
    	//strip tags, if desired
		    if ($strip_html) {
		        $input = strip_tags($input);
		    }

		    //no need to trim, already shorter than trim length
		    if (strlen($input) <= $length) {
		        return $input;
		    }

		    //find last space within length
		    $last_space = strrpos(substr($input, 0, $length), ' ');
		    $trimmed_text = substr($input, 0, $last_space);

		    //add ellipses (...)
		    if ($ellipses) {
		        $trimmed_text .= '...';
		    }

		    return $trimmed_text;
		}
	}
	if (isset($node->field_portfolio_style) && !empty($node->field_portfolio_style)) {
		$portfolio_style = $node->field_portfolio_style['und'][0]['value'];
	} else $portfolio_style = 'style1';
?>
<?php if ($portfolio_style == 'style3'): ?>

<?php elseif (empty($page_title_background)): ?>
<!-- PAGE TITLE -->
<div class="page-title-cont page-title-small grey-light-bg">
	<div class="relative container align-left">
		<div class="row">
			
			<div class="col-md-8">
				<h1 class="page-title"><?php print drupal_get_title(); ?></h1>
				<?php if(isset($node) && !empty($node->body['und'][0]['summary'])): ?>
				<div class="page-sub-title">
	                <?php print  trim_text($node->body['und'][0]['summary'], 50); ?>
	            </div>
	        	<?php endif; ?>
			</div>
			<?php if($breadcrumb): ?>
			<div class="col-md-4">
				<?php print $breadcrumb; ?>
			</div>
			<?php endif; ?>			
		</div>
	</div>
</div>
<?php else: ?>
<!-- PAGE TITLE LARGE IMG -->
<div class="page-title-cont page-title-large page-title-img grey-dark-bg pt-250" style="background-image: url(<?php print $page_title_background; ?>)">
	<div class="relative container align-left">
		<div class="row">			
			<div class="col-md-8">
				<h1 class="page-title"><?php print drupal_get_title(); ?></h1>
				<?php if(isset($node) && !empty($node->body['und'][0]['summary'])): ?>
				<div class="page-sub-title">
	                <?php print  trim_text($node->body['und'][0]['summary'], 50); ?>
	            </div>
	        	<?php endif; ?>
			</div>
			
			<?php if($breadcrumb): ?>
			<div class="col-md-4">
				<?php print $breadcrumb; ?>
			</div>
			<?php endif; ?>			
		</div>
	</div>
</div>				
<?php endif; ?>
<?php if ($page['content']): ?>
	<?php
	if (!empty($tabs['#primary']) || !empty($tabs['#secondary'])):
	print render($tabs);
	endif;
	print $messages;
	?>
	<?php if(isset($node) && empty($node->body)): ?>
		<?php print render($page['content']); ?>
	<?php else: ?>
	<div class="p-140-cont">
		<?php print render($page['content']); ?>
	</div>
	<?php endif; ?>
<?php endif; ?>

<?php if ($page['page_section']): ?>
	<?php print render($page['page_section']); ?>
<?php endif; ?>
<?php if ($page['bottom_page']): ?>
	<?php print render($page['bottom_page']); ?>
<?php endif; ?>
<?php require_once(drupal_get_path('theme','hawell').'/tpl/footer.tpl.php');?>