Welcome Guest, Not a member yet? Register   Sign In
How to use LayoutView with parser?
#8

(This post was last modified: 07-22-2021, 07:26 PM by Ilham Fadil.)

It will works if you add comments to the view

create parser and return it inside a view

Code:
$parser = Services::parser();
$render = $parser->setData($data)->render('layout_files');

return view('layout_files', array_merge(
    ['content' => $render],
    $data
));


and for the view like this

add html layout below the comment
Code:
{#
<?= $this->extend('template/app') ?>
<?= $this->section('content') ?>
<?= $content ?>
<?= $this->endSection() ?>
#}

<html></html>
Reply


Messages In This Thread
How to use LayoutView with parser? - by aleckyann - 08-14-2020, 10:40 AM
RE: How to use LayoutView with parser? - by Ilham Fadil - 04-30-2021, 11:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB