<?php
global $objPage;
$metaTitle = ($this->entry['row']['meta_title'] ? $this->entry['row']['meta_title'] : 'Ausflug '.$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']) ?></h1>
<p class="info"><?= $this->entry['row']['info'] ?></p>
<?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=Ausflug <?= $this->entry['row']['title'] ?>" class="btn orange">Kontaktieren Sie uns!</a></li>
<li class="watchlist_btns"><a href="javascript:;" data-rel-type="trip" 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="trip" 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 Ausflug</h3>
<div class="cols-2">
<?= $this->entry['row']['worth_knowing'] ?>
</div>
</div>
</div>
<?php endif ?>
<?php if ($this->entry['stations']): ?>
<div class="stations">
<h2 class="center">Stationen</h2>
<div class="flexslider">
<ul>
<?php foreach($this->entry['stations'] as $station): ?>
<li class="station <?= $station['type'] ?>">
<div class="inner">
<div class="day"><?= $station['pos'] ?></div>
<figure><a href="<?= $station['image_path'] ?>" data-lightbox="station" rel="group_station" title="<?= $station['image_meta']['de']['caption'] ?>"><img src="<?= ($station['image_path'] ? $this->getImage($station['image_path'], 380,250, 'center_center') : 'files/layout/images/no_image.jpg'); ?>" alt="<?= $station['image_meta']['de']['title'] ?>"></a></figure>
<div class="typo_wrap">
<h3><?= $station['location'] ?></h3>
<?= (substr($station['teaser'], 0, 1) == '<' ? $station['teaser'] : '<p class="teaser">'.nl2br($station['teaser']).'</p>') ?>
</div>
</div>
</li>
<?php endforeach ?>
</ul>
</div>
</div>
<?php endif ?>
</div>