<?php
include 'tabs.php';

foreach ($this->article as $article) {
    $html[] = "{tab $article->title}";
    $html[] = getTab($article, $this, $this->options);
}
$html[] = "{/tabs}";

if ($this->params->get('legacy_mode', '0') === '0') {
    $containerClass = $this->getContainerClass();
    $articleCount = count($this->article);
    array_unshift($html, "<div class=\"$containerClass\" data-count=\"$articleCount\">");
    array_push($html, '</div>');
}
if ($this->params->get('show_page_heading')) {
    array_unshift($html, "<div class=\"page-header\"><h2 itemprop=\"headline\">{$this->params->get('page_title')}</h2></div>");
}

echo implode("\n", $html);
