<?php
    $CMS_URL = 'https://cms.pixel-kraft.de';

    // $html[] = "<pre>". print_r($this, true) ."</pre>";
	$html[] = ($this->params->get('show_page_heading')) ? "<div class=\"page-header\"><h2 itemprop=\"headline\">{$this->params->get('page_title')}</h2></div>" : "";

    foreach ($this->team as $team) {
        $html[] = "<div class='department'>";
//        $link = JRoute::_("index.php?option=com_pixelcms_articles&view=pixelcms_articles&articleId=$team->id");
//        $html[] = "<a href='$link'><h2>$team->title</h2></a>";
        $html[] = "<h3>$team->title</h3>";
        $html[] = '<div class="department__workers">';
        foreach ($team->workers as $worker) {
            $html[] = "<div class='worker'>";
            $html[] = $this->displayWorker($worker, true);
            $html[] = "</div>";
        }
        $html[] = "</div>"; // department__workers
        $html[] = "</div>"; // department
    }

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