AlkantarClanX12
| Current Path : /var/www/clients/client1/web1/web/sites/all/themes/hawell/tpl/ |
| Current File : /var/www/clients/client1/web1/web/sites/all/themes/hawell/tpl/page.tpl.php |
<?php require_once(drupal_get_path('theme','hawell').'/tpl/header.tpl.php');?>
<?php
if (isset($node->field_page_title_style) && !empty($node->field_page_title_style))
{
$page_title_style = $node->field_page_title_style['und'][0]['value'];
} else $page_title_style = 'big_grey';
if ($page_title_style == 'small_grey') {
$page_title_class = 'page-title-small grey-light-bg';
} elseif ($page_title_style == 'small_dark') {
$page_title_class = 'page-title-small grey-dark-bg';
} elseif ($page_title_style == 'small_white') {
$page_title_class = 'page-title-small';
} elseif ($page_title_style == 'big_dark') {
$page_title_class = 'page-title-big grey-dark-bg';
} elseif ($page_title_style == 'big_grey') {
$page_title_class = 'page-title-big grey-light-bg';
} elseif ($page_title_style == 'big_white') {
$page_title_class = 'page-title-big';
} elseif ($page_title_style == 'big_img') {
$page_title_class = 'page-title-big page-title-img grey-dark-bg';
} elseif ($page_title_style == 'large_img') {
$page_title_class = 'page-title-large page-title-img pt-250';
} else {
$page_title_class = 'page-title-big grey-light-bg';
}
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;
}
}
?>
<?php if (empty($page_title_background)): ?>
<!-- PAGE TITLE -->
<div class="page-title-cont <?php print $page_title_class; ?>">
<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']) && ($page_title_style == 'big_grey' || $page_title_style == 'big_dark' || $page_title_style == 'big_white')): ?>
<div class="page-sub-title">
<?php print trim_text($node->body['und'][0]['summary'],'54'); ?>
</div>
<?php endif; ?>
</div>
<?php if($breadcrumb): ?>
<div class="col-md-4">
<?php print $breadcrumb; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php if($page_title_style == 'small_white' || $page_title_style == 'big_white'): ?>
<hr class="mt-0 mb-0">
<?php endif; ?>
<?php else: ?>
<!-- PAGE TITLE LARGE IMG -->
<div class="page-title-cont <?php print $page_title_class; ?>" 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'],'54'); ?>
</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="container p-110-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');?>