public function create_html_template() { // get the html email template $this->html_template = View_Layout::factory($this->htmlview_path); $this->html_template->set_layout($this->layout); // set textview params to template if (count($this->htmlview_params) > 0) { foreach ($this->htmlview_params as $key => $htmlview_param) { $this->html_template->set($key, $htmlview_param); } } }