Changeset 7959
- Timestamp:
- 03/19/08 05:37:43 (7 months ago)
- Files:
-
- branches/1.1/lib/config/sfViewConfigHandler.class.php (modified) (2 diffs)
- branches/1.1/lib/view/sfPHPView.class.php (modified) (1 diff)
- branches/1.1/lib/view/sfView.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/config/sfViewConfigHandler.class.php
r7899 r7959 162 162 { 163 163 $data = ''; 164 165 164 if ($this->getConfigValue('has_layout', $viewName) && false !== $layout = $this->getConfigValue('layout', $viewName)) 166 165 { 167 $data = " \$this->setDecoratorTemplate('$layout'.\$this->getExtension());\n"; 166 // decorator configuration 167 $data .= " \$this->setDecoratorTemplate(sfConfig::get('symfony.view.'.\$this->moduleName.'_'.\$this->actionName.'_layout', '$layout'.\$this->getExtension()));\n"; 168 168 } 169 169 … … 171 171 // So, we check if the user requested has_layout: true or if he gave a layout: name for this particular action 172 172 $localLayout = isset($this->yamlConfig[$viewName]['layout']) || isset($this->yamlConfig[$viewName]['has_layout']); 173 if (!$localLayout && $data)173 if (!$localLayout && isset($data)) 174 174 { 175 175 $data = " if (!\$this->context->getRequest()->isXmlHttpRequest())\n {\n $data }\n"; branches/1.1/lib/view/sfPHPView.class.php
r7951 r7959 106 106 require($this->context->getConfigCache()->checkConfig('modules/'.$this->moduleName.'/config/view.yml')); 107 107 108 // decorator configuration109 $this->setDecoratorTemplate(sfConfig::get('symfony.view.'.$this->moduleName.'_'.$this->actionName.'_layout'));110 111 108 // set template directory 112 109 if (!$this->directory) branches/1.1/lib/view/sfView.class.php
r7846 r7959 129 129 $this->parameterHolder->add(sfConfig::get('mod_'.strtolower($moduleName).'_view_param', array())); 130 130 131 $this->decoratorDirectory = sfConfig::get('sf_app_template_dir');132 133 131 // include view configuration 134 132 $this->configure();