Author: Jeremy Bush (jeremy.bush@kohanaframework.org)
Author: Woody Gilk (woody.gilk@kohanaframework.org)
 /**
  * Kick off the Mustache render process and return the rendered string (HTML/JSON/etc)
  *
  * @return string
  */
 public function render()
 {
     /**
      * If base layout is not to be rendered
      */
     if (!$this->render_layout) {
         return parent::render();
     }
     /**
      * We want to include the base layout
      */
     $partials = $this->_partials;
     $partials[self::CONTENT_PARTIAL] = $this->_template;
     $template = $this->_load($this->_layout);
     return $this->_stash($template, $this, $partials)->render();
 }
Beispiel #2
0
 public static function factory($layout = 'layout')
 {
     $k = parent::factory();
     $k->set_layout($layout);
     return $k;
 }
Beispiel #3
0
 public function render($class, $template = NULL)
 {
     $this->_engine->setPartials(array(Kostache_Layout::CONTENT_PARTIAL => parent::render($class, $template)));
     return $this->_engine->loadTemplate($this->_layout)->render($class);
 }