<?php
global $objPage;
$metaTitle = ($this->entry['row']['meta_title'] ? $this->entry['row']['meta_title'] : 'Hotel '.$this->entry['row']['title']);
$metaKeywords = $this->entry['row']['meta_keywords'];
$metaDescription = ($this->entry['row']['meta_description'] ? $this->entry['row']['meta_description'] : strip_tags($this->entry['row']['teaser']));
$objPage->pageTitle = $metaTitle;
$objPage->description = $metaDescription;
$GLOBALS['TL_KEYWORDS'] = $metaKeywords;
$GLOBALS['TL_HEAD'][] = '<meta property="og:title" content="'.$metaTitle.'">';
$GLOBALS['TL_HEAD'][] = '<meta property="og:url" content="'.$this->replaceInsertTags('{{env::url}}').'/'.$this->replaceInsertTags('{{env::request}}').'">';
$GLOBALS['TL_HEAD'][] = '<meta property="og:description" content="'.$metaDescription.'">';
if ($this->entry['image_path']) $GLOBALS['TL_HEAD'][] = '<meta property="og:image" content="'.$this->replaceInsertTags('{{env::url}}').'/'.$this->entry['image_path'].'">';
else $GLOBALS['TL_HEAD'][] = '<meta property="og:image" content="'.$this->replaceInsertTags('{{env::url}}').'/files/layout/images/hideaway4you_logo.png">';
?>
<ul class="breadcrumb">
<li class="first"><a href="/">Home</a></li>
<?php foreach($this->entry['breadcrumb'] as $bce): ?>
<li><a href="<?php echo $bce['url'] ?>"><?php echo $bce['title'] ?></a></li>
<?php endforeach ?>
<li class="last"><span><?php echo $this->entry['row']['title'] ?><span></li>
</ul>
<div class="<?php echo $this->class; ?> reader block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<div class="row">
<div class="col-sm-6">
<div class="gallery">
<?php if ($this->entry['image_path']): ?>
<figure class="main_image"><img src="<?php echo $this->getImage($this->entry['image_path'], 750, false, 'box'); ?>" alt="<?= $this->entry['image_meta']['de']['title'] ?>"></figure>
<?php endif ?>
<?php if($this->entry['gallery']): ?>
<div class="thumbails_wrapper">
<div class="flexslider thumbnails">
<ul>
<?php foreach($this->entry['gallery'] as $img): ?>
<li><figure>
<a href="<?php echo $img['path']; ?>" data-lightbox="gallery" rel="group_gallery" title="<?= $img['meta']['de']['caption'] ?>"><img src="<?php echo $this->getImage($img['path'], 165,110, 'center_center'); ?>" alt="<?= $img['meta']['de']['title'] ?>"></a></li>
</figure>
<?php endforeach ?>
</ul>
</div>
</div>
<?php endif ?>
</div>
</div>
<div class="col-sm-6">
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?> class="page_headline"><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<h1><?= ($this->entry['row']['headline'] ? $this->entry['row']['headline'] : $this->entry['row']['title']) ?><?php if ($this->entry['row']['rating'] > 0): ?><span class="rating_widget val_<?= number_format($this->entry['row']['rating'], 1, '_', '') ?>"><span></span></span><?php endif ?></h1>
<?php if ($this->entry['row']['address']): ?>
<p class="address"><?= $this->entry['row']['address'] ?></p>
<?php endif ?>
<?php if ($this->entry['row']['teaser']): ?>
<div class="highlights">
<h4>Highlights</h4>
<?= (substr($this->entry['row']['teaser'], 0, 1) == '<' ? $this->entry['row']['teaser'] : nl2br($this->entry['row']['teaser'])) ?>
</div>
<?php endif ?>
<?php if ($this->entry['row']['testimonial']): ?>
<div class="testimonial">
<article>"<?= $this->entry['row']['testimonial'] ?>"</article>
<author><?= $this->entry['row']['testimonial_author'] ?></author>
</div>
<?php endif ?>
<ul class="cta">
<li><a href="{{link_url::4}}?object=<?= $this->entry['row']['title'] ?>" class="btn orange">Kontaktieren Sie uns!</a></li>
<li class="watchlist_btns"><a href="javascript:;" data-rel-type="hotel" data-rel-id="<?php echo $this->entry['row']['id'] ?>" onclick="addWatchlist(this);" class="btn blue watchlist_add"><i class="icon-bookmark-add"></i>Auf den Merkzettel</a>
<a style="display:none;" href="javascript:;" data-rel-type="hotel" data-rel-id="<?php echo $this->entry['row']['id'] ?>" onclick="removeWatchlist(this);" class="btn blue watchlist_remove"><i class="icon-bookmark-trash"></i>Vom Merkzettel entfernen</a></li>
</ul>
{{file::hideaway4you/inc.like_toolbar.php?media=<?= $this->replaceInsertTags('{{env::url}}').'/'.$this->entry['image_path'] ?>}}
</div>
</div>
<div class="description cols-2">
<?= $this->entry['row']['description'] ?>
</div>
<?php if ($this->entry['row']['worth_knowing']): ?>
<div class="box worth_knowing fullwith">
<i class="icon-info-circle"></i>
<div class="wrap">
<?php if ($this->entry['row']['video']): ?><a href="https://www.youtube.com/embed/<?= $this->entry['row']['video'] ?>?autoplay=1" class="btn video ico_only fancybox fancybox.iframe"><i class="icon-camera-movie"></i></a><?php endif ?>
<h3>Infos zum Hotel</h3>
<div class="cols-2">
<?= $this->entry['row']['worth_knowing'] ?>
</div>
</div>
</div>
<?php endif ?>
<?php if (count($this->related) > 1): ?>
<div class="regions">
<h2 class="center">Weitere Hotels</h2>
<div class="flexslider">
<ul>
<?php foreach($this->related as $hotel):
if ($this->entry['row']['title'] != $hotel['row']['title']): ?>
<li class="hotel">
<div class="inner">
<figure><a href="<?= $hotel['url'] ?>"><img src="<?= ($hotel['image_path'] ? $this->getImage($hotel['image_path'], 380,250, 'center_center') : 'files/layout/images/no_image.jpg'); ?>" alt="<?= $hotel['image_meta']['de']['title'] ?>"></a></figure>
<div class="typo_wrap">
<h3><?= $hotel['row']['title'] ?></h3>
<?= (substr($hotel['row']['teaser'], 0, 1) == '<' ? $hotel['row']['teaser'] : '<p class="teaser">'.nl2br($hotel['row']['teaser']).'</p>') ?>
</div>
<p class="more"><a href="<?= $hotel['url'] ?>" class="btn btn-default btn-sm"><span>mehr</span></a></p>
</div>
</li>
<?php endif; endforeach ?>
</ul>
</div>
</div>
<?php endif ?>
</div>