/** * 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(); }
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); }