first commit
This commit is contained in:
39
templates_user/articles/news.php
Normal file
39
templates_user/articles/news.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<? global $lang, $config, $settings;?>
|
||||
<div id="news" class="row">
|
||||
<? if ( is_array( $this -> articles ) ): foreach ( $this -> articles as $article ):?>
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );?>
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="article-image">
|
||||
<? if ( $img = \front\factory\Articles::get_image( $article ) ):?>
|
||||
<img src="<?= $img;?>" alt="<?= $article['language']['title'];?>">
|
||||
<? endif;?>
|
||||
<h2 class="article-title">
|
||||
<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;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $article['language']['title'];?></a>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="entry">
|
||||
<?
|
||||
if ( $article['language']['entry'] )
|
||||
{
|
||||
$content = $article['language']['entry'];
|
||||
|
||||
$content = preg_replace( "/<img[^>]+\>/i", "", $content );
|
||||
$content = preg_replace( "/<p[^>]*?><\/p>/", "", $content );
|
||||
echo $content;
|
||||
|
||||
if ( $article['language']['text'] )
|
||||
$more = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $article['language']['text'];
|
||||
|
||||
$more = false;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user