- Timestamp:
- 01/23/06 21:41:22 (3 years ago)
- Files:
-
- trunk/trax/vendor/trax/trax_generator.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/trax/vendor/trax/trax_generator.php
r122 r124 36 36 $view_template_file, 37 37 $model_template_file, 38 $scaffold_template_path; 38 $scaffold_template_path, 39 $layout_path, 40 $layout_filename; 39 41 public 40 42 $view_file_extention = TRAX_VIEWS_EXTENTION; … … 111 113 $this->extra_path = substr($name,0,strrpos($name, "/")); 112 114 $name = Inflector::underscore(substr($name,strrpos($name, "/")+1)); 113 $this->view_path .= "/$this->extra_path/$name"; 114 $this->layouts_path .= "/$this->extra_path /$name";115 $this->view_path .= "/$this->extra_path/$name"; 116 $this->layouts_path .= "/$this->extra_path"; 115 117 $this->controller_path .= "/$this->extra_path"; 116 118 $this->helper_path .= "/$this->extra_path"; … … 119 121 $this->view_path .= "/$name"; 120 122 } 123 $this->layout_filename = $name; 121 124 122 125 $this->controller_class = Inflector::camelize($name); … … 317 320 318 321 # Generate the layout for the scaffolding 319 $layout_file = "$this->layouts_path/$controller_name.".$this->view_file_extention; 322 $layout_file = $this->layouts_path."/".$this->layout_filename.".".$this->view_file_extention; 323 if(!file_exists($this->layouts_path)) { 324 mkdir($this->layouts_path); 325 } 320 326 ob_start(); 321 327 include("$this->scaffold_template_path/layout.phtml");

