Pregunta

Is it possible to get html source via Template::render() ? which look like $this->load->view() ?

Thanks,

¿Fue útil?

Solución

The method render() is as such:

public static function render( $layout = null )

And its return is void so simple answer no. It does not have an option to do so and does not return any output.

What you want to use if you want to get the HTML output is the load_view() method like so:

Template::load_view('you_view_name', $data, '', true, $html);
echo $html;

Note your arguments will differ from the above, so check the documentation linked to set them to what you want.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top