<?php
$culture = $sf_user->getCulture();
if (isset($articles) && count($articles) > 0) {
    $module_action = $sf_request->getParameter('module') . '_' . $sf_request->getParameter('action');
    $html = '';
    ob_start();
//
//    print_r($articles);
//    die();
    foreach ($articles as $article) {
        ?>
        <div class="articles_item">
            <a href="<?php echo url_for('@article_show?alias=' . $article['alias']); ?>" class="anb">
                <img src="/i/n.gif" class="articles_item__img" style="background-image: url(/u/i/<?php echo Page::replaceImageSize($article['cover'], 'S'); ?>)"/>
                <span class="articles_item__link green_link"><?php echo $article['Translation'][$culture]['title']; ?></span>
                <i class="br5"></i>
                <span class="articles_item__text black_link"><?php echo $article['Translation'][$culture]['description']; ?></span>
            </a>
        </div>
        <?php
    }
    $html = ob_get_contents();
    ob_end_clean();
    if($module_action == 'product_show'){
        echo '<div class="product_section product__articles">';
        echo '<div class="caption"><a class="green_link" href="/' . $culture . '/article/?tag_id=' . $tag_id . '">' . __('Статьи') . '</a></div>';
        echo '<div class="max_width">' . $html . '</div>';
        echo '</div>';
    }else{
        echo $html;
    }
}
if ($die)
    die();
?>