diff --git a/framework/library/astroid/Element/Layout.php b/framework/library/astroid/Element/Layout.php index 12a12b36..5c40070e 100644 --- a/framework/library/astroid/Element/Layout.php +++ b/framework/library/astroid/Element/Layout.php @@ -54,6 +54,7 @@ public static function renderSublayout($source, $template = '', $type = 'layouts 'title'=> 'title' ] ]; + $options['layout_type'] = 'sublayout'; $content = ''; foreach ($layout['sections'] as $section) { $section = new Section($section, $devices, $options); diff --git a/framework/library/astroid/Element/Section.php b/framework/library/astroid/Element/Section.php index 99bed31f..6856cdca 100644 --- a/framework/library/astroid/Element/Section.php +++ b/framework/library/astroid/Element/Section.php @@ -20,6 +20,14 @@ class Section extends BaseElement public $hasHeader = false; public $hasFooter = false; + public function __construct($data, $devices, $options = array()) + { + if (isset($options['layout_type']) && $options['layout_type'] == 'sublayout') { + $this->_tag = 'div'; + } + parent::__construct($data, $devices, $options); + } + public function render() { $content = '';