<?php $baseThemeUrl = Yii::app()->theme->baseUrl; ?>

<?php
$issetPageWidget = isset($page) && $page->widget;
if ($issetPageWidget && $page->widget_position == InfoPages::POSITION_TOP) {
    $this->renderPartial('_index_view_widget', array(
        'widget' => $page->widget,
        'page' => $page,
        'widgetTitles' => $page->widget_titles
    ));
    echo '<div class="clear"></div><br />';
}

?>

<?php if (isset($page) && $page) { ?>
    <div class="content">
        <?php
        if ($page->title) {
            echo '<h1 class="fint l_fint">' . CHtml::encode($page->title) . '</h1>';
        }

        ?>

        <?php
        if ($page->body) {
            echo HSite::parseText($page->body);
        }
        ?>
    </div>
<?php } ?>

<?php
if ($issetPageWidget && $page->widget_position == InfoPages::POSITION_BOTTOM) {
    $this->renderPartial('_index_view_widget', array(
        'widget' => $page->widget,
        'page' => $page,
        'widgetTitles' => $page->widget_titles
    ));
    echo '<div class="clear"></div><br />';
}

?>
