<?php
    function sidebar_area_3() {
        $isPreview = $GLOBALS['theme_settings']['is_preview'];
        $GLOBALS['isModuleContentExists'] = false;
        ob_start();
?>
        <?php
    renderTemplateFromIncludes('joomlaposition_1');
?>
        <?php
            $content = trim(ob_get_clean());
            $modContentExists = $GLOBALS['isModuleContentExists'];
            $showContent = strlen(trim(preg_replace('/<!-- empty::begin -->[\s\S]*?<!-- empty::end -->/', '', $content)));
        ?>
        <?php if ($isPreview || ($content )): ?>
            <aside class="bd-sidebararea-3-column  bd-flex-vertical bd-flex-fixed <?php echo ($isPreview && (!$modContentExists && !$showContent)) ? ' hidden bd-hidden-sidebar' : ''; ?>">
                <div class="bd-sidebararea-3 bd-flex-wide  bd-contentlayout-offset">
                    
                    <?php echo $content; ?>
                    
                </div>
            </aside>
        <?php endif; ?>
<?php
    }
?>