diff --git a/bin/Site/Category.js b/bin/Site/Category.js index 315b9b1332bcf05d604618f2d07a85d2f450cd85..a8f00fbcfe8f1849d030d73da95bd13652e6770d 100644 --- a/bin/Site/Category.js +++ b/bin/Site/Category.js @@ -149,11 +149,19 @@ define('package/quiqqer/bricks/bin/Site/Category', [ var Site = this.getAttribute( 'Site' ), Project = Site.getProject(); - QUIAjax.get('package_quiqqer_bricks_ajax_project_getAreas', callback, { - 'package' : 'quiqqer/bricks', - project : Project.encode(), - layout : Site.getAttribute( 'layout' ) - }); + Project.getConfig(function(layout) + { + if ( Site.getAttribute( 'layout' ) ) { + layout = Site.getAttribute( 'layout' ); + } + + QUIAjax.get('package_quiqqer_bricks_ajax_project_getAreas', callback, { + 'package' : 'quiqqer/bricks', + project : Project.encode(), + layout : layout + }); + + }, 'layout'); }, /** diff --git a/lib/QUI/Bricks/Brick.php b/lib/QUI/Bricks/Brick.php index 6fec28cf93b58801e5f393bc483b721ec4bc98d4..c63457d755f3f3ddd8bb4967540fcfed267e1345 100644 --- a/lib/QUI/Bricks/Brick.php +++ b/lib/QUI/Bricks/Brick.php @@ -19,12 +19,14 @@ class Brick extends QUI\QDOM { /** * Brick settings + * * @var array */ protected $_settings = array(); /** * Constructor + * * @param array $params - brick params */ public function __construct($params=array()) @@ -62,7 +64,7 @@ public function __construct($params=array()) } // control default settings - if ( $Control ) + if ( is_object( $Control ) ) { $controlSettings = $Control->getAttributes(); @@ -104,6 +106,10 @@ public function __construct($params=array()) */ public function check() { + if ( $this->getAttribute( 'type' ) == 'content' ) { + return $this; + } + $Control = $this->_getControl(); if ( !$Control ) { @@ -137,12 +143,17 @@ public function create() /** * Return the internal control + * * @return QUI\Control|Bool */ protected function _getControl() { $Ctrl = $this->getAttribute( 'type' ); + if ( $Ctrl === 'content' ) { + return true; + } + if ( !is_callable( $Ctrl ) && !class_exists( $Ctrl ) ) { return false; } diff --git a/lib/QUI/Bricks/Manager.php b/lib/QUI/Bricks/Manager.php index a4beee2a8b7c952da8bb77cb3df5d06575ae1186..0fdc4cffbeaa1b76d5785676d057f83983313d64 100644 --- a/lib/QUI/Bricks/Manager.php +++ b/lib/QUI/Bricks/Manager.php @@ -96,9 +96,9 @@ public function getAreasByProject(Project $Project, $layoutType=false) $projectName = $Project->getName(); - if ( !$layoutType ) { - $layoutType = $Project->getAttribute( 'layout' ); - } +// if ( !$layoutType ) { +// $layoutType = $Project->getAttribute( 'layout' ); +// } // get all vhosts, and the used templates of the project $vhosts = QUI::getRewrite()->getVHosts();