<?php
$this->pageTitle .= ' - ' . Yii::t('common', 'Apartment search');

$h1 = HSeo::getH1();
$body = HSeo::getBody();

if($h1){
    echo '<h1>'.$h1.'</h1>';
}

if ($filterName) {
    $this->breadcrumbs = array(
        Yii::t('common', 'Apartment search') => array('/quicksearch/main/mainsearch'),
        tt('all_by_filter', 'apartments') . ' "' . $filterName . '"',
    );

    $this->widget('application.modules.apartments.components.ApartmentsWidget', array(
        'criteria' => $criteria,
        'widgetTitle' => tt('all_by_filter', 'apartments') . ' "' . $filterName . '"',
    ));
} else {
    $this->breadcrumbs = array(
        Yii::t('common', 'Apartment search'),
    );

    $wTitle = null;
    if (issetModule('rss')) {
        $wTitle = '<a target="_blank" title="' . tt('rss_subscribe', 'rss') . '" class="rss-icon" href="'
            . $this->createUrl('mainsearch', CMap::mergeArray($_GET, array('rss' => 1))) . '"><i class="fas fa-rss"></i></a> '
            . Yii::t('module_apartments', 'Apartments list');
    }

    $this->widget('application.modules.apartments.components.ApartmentsWidget', array(
        'criteria' => $criteria,
        'count' => $apCount,
        'widgetTitle' => $wTitle,
        'isH1Widget' => true,
        'numBlocks' => 2
    ));
}

if($body){
    echo '<p>'.$body.'</p>';
}
