<?php

$helper = $this->helper('Solwin\Cpanel\Helper\Data');
$sidebar_adv_1 = $helper->getCpanelConfigValue('cpanelsection/homemaincontent/sidebar_adv_1');
$sidebar_adv_2 = $helper->getCpanelConfigValue('cpanelsection/homemaincontent/sidebar_adv_2');
$sidebar_adv_3 = $helper->getCpanelConfigValue('cpanelsection/homemaincontent/sidebar_adv_3');
$sidebar_blog_static = $helper->getCpanelConfigValue('cpanelsection/homemaincontent/sidebar_blog_static');
$sidebar_testimonials_static = $helper->getCpanelConfigValue('cpanelsection/homemaincontent/sidebar_testimonials_static');
if ($sidebar_adv_1 != '') {
    echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($sidebar_adv_1)->toHtml();
}
if ($sidebar_blog_static != '') {
    echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($sidebar_blog_static)->toHtml();
}
if ($sidebar_adv_2 != '') {
    echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($sidebar_adv_2)->toHtml();
}
if ($sidebar_testimonials_static != '') {
    echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($sidebar_testimonials_static)->toHtml();
}
if ($sidebar_adv_3 != '') {
    echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($sidebar_adv_3)->toHtml();
}