/** * Loads the template [View] object. */ public function before() { if ($this->auto_render === TRUE) { // Load the template $this->template = Xslt::factory($this->template); } return parent::before(); }
public function action_index() { $xsl = Xslt::factory("welcome"); $xsl->media = array("script" => array("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js")); $xsl->snippets = array("header" => Xslt::factory("snippets/header")->render(), "footer" => Xslt::factory("snippets/footer")->render()); $xsl->title = "Teste"; $xsl->items = array("item" => array(array("name" => "test 1", "value" => "value 1"), array("name" => "test 2", "value" => "value 2"), array("name" => "test 3", "value" => "value 3"))); $this->request->response = $xsl->render(); }