Вопрос

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

Thanks,

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top