124 lines
4.7 KiB
PHP
124 lines
4.7 KiB
PHP
<?
|
|
$this -> page_id;
|
|
$page_template = \front\factory\Pages::get_layout_id( $this -> page_id );
|
|
?>
|
|
|
|
<? if ( $page_template == 9 or $page_template == 38 ) : ?>
|
|
<div class="row">
|
|
<? if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $key => $article )
|
|
{
|
|
if($key == 0) {
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo $tpl -> render( '__partials/wideo-i-audio-box' );
|
|
echo $tpl -> render( 'articles/article-entry' );
|
|
} else {
|
|
if ( $article['password'] and !\S::get_session( 'article-' . $article['id'] . '-' . $article['password'] ) )
|
|
echo \front\view\Articles::password_view( [ 'article' => $article ] );
|
|
else
|
|
{
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo $tpl -> render( 'articles/article-entry' );
|
|
}
|
|
}
|
|
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<? elseif ( $page_template == 39 ) : ?>
|
|
<div class="row">
|
|
<? if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $key => $article ) : ?>
|
|
<?
|
|
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
|
?>
|
|
|
|
<div class="col-sm-6 col-md-3 pb-4 mb-2">
|
|
<div class="article-entry partners">
|
|
<div class="img">
|
|
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" class="more" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>>
|
|
<img src="<?= $article['language']['main_image'] ? $article['language']['main_image'] : \front\factory\Articles::get_image( $article );?>" alt="">
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<? endforeach; ?>
|
|
</div>
|
|
<? elseif ( $page_template == 59 ) : ?>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<? if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $key => $article )
|
|
{
|
|
if( $key == 1) echo '<div class="blog-list-masonry">';
|
|
|
|
if($key == 0) {
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo '<div class="blog-first-box">';
|
|
echo $tpl -> render( 'articles/article-entry' );
|
|
echo \front\view\Newsletter::newsletter();
|
|
// include 'templates_user/blog-newsletter-v2.php';
|
|
echo '</div>';
|
|
} else {
|
|
if ( $article['password'] and !\S::get_session( 'article-' . $article['id'] . '-' . $article['password'] ) )
|
|
echo \front\view\Articles::password_view( [ 'article' => $article ] );
|
|
else
|
|
{
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo $tpl -> render( 'articles/article-entry' );
|
|
|
|
}
|
|
}
|
|
|
|
if( $key == count($this -> articles) - 1) echo '</div>';
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<? else: ?>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<? if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $key => $article )
|
|
{
|
|
if( $key == 1) echo '<div class="blog-list-masonry">';
|
|
|
|
if($key == 0) {
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo '<div class="blog-first-box">';
|
|
echo $tpl -> render( 'articles/article-entry' );
|
|
echo \front\view\Newsletter::newsletter();
|
|
// include 'templates_user/blog-newsletter-v2.php';
|
|
echo '</div>';
|
|
} else {
|
|
if ( $article['password'] and !\S::get_session( 'article-' . $article['id'] . '-' . $article['password'] ) )
|
|
echo \front\view\Articles::password_view( [ 'article' => $article ] );
|
|
else
|
|
{
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo $tpl -> render( 'articles/article-entry' );
|
|
|
|
}
|
|
}
|
|
|
|
if( $key == count($this -> articles) - 1) echo '</div>';
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<? endif; ?>
|