3 * extends the CMS preview - but should take the template from the builder..
4 * intended use is with the bootstrap code HTML generated..
7 require_once 'Pman/Cms/Preview.php';
9 class Pman_Builder_Preview extends Pman_Cms_Preview
13 function loadPage($prefix, $name, $default = false)
15 //var_dump($name, $default);
16 //DB_DataObject::debugLevel(5);
17 parent::loadPage($prefix, $name, $default );
30 $proj = HTML_FlexyFramework::get()->project;
31 // DB_DataObject::debugLevel(1);
32 $m = DB_DAtaObject::factory('Builder_modules');
33 $m->get('name', $proj );
35 // needs to modify the template directory??
36 // use the builder_module == app name
37 // look for part with same name.
38 $template_engine = new HTML_Template_Flexy(array(
39 'templateDir' => $m->path
41 $template_engine->compile($this->template);
42 if ($this->elements) { /* BC crap! */
43 $this->elements = HTML_Template_Flexy_Factory::setErrors($this->elements,$this->errors);
45 $template_engine->elements = $this->elements;
46 $template_engine->outputObject($this,$this->elements);