Development

Changeset 7080

You must first sign up to be able to contribute.

Changeset 7080

Show
Ignore:
Timestamp:
01/17/08 10:47:25 (10 months ago)
Author:
dwhittle
Message:

dwhittle: tweaked view config handler to accept module/template for layout (plugin layouts via view.yml)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dwhittle/1.1/lib/config/sfViewConfigHandler.class.php

    r6455 r7080  
    210210    if ($this->getConfigValue('has_layout', $viewName) && false !== $layout = $this->getConfigValue('layout', $viewName)) 
    211211    { 
    212       $data = "  \$this->setDecoratorTemplate('$layout'.\$this->getExtension());\n"; 
     212      if(strpos($layout, '/')) 
     213      { 
     214        list($module, $layout) = explode('/', $layout, 2); 
     215 
     216        $data .= "  \$this->setDecoratorDirectory(sfLoader::getTemplateDir('$module', '$layout'.\$this->getExtension()));\n"; 
     217      } 
     218 
     219      $data .= "  \$this->setDecoratorTemplate('$layout'.\$this->getExtension());\n"; 
    213220    } 
    214221