- 一般用于视图布局,侧边栏等需要复用或者自定义的块状
{section('name')}...{/section}
{@section('name')}
//#布局文件layout.html
<html>
<div>{@section('main')}</div>
<div>{@section('sidebar')}</div>
</html>
//#主视图文件main.html
{include 'layout'/}
{section('sidebar')} <b>sidebar+sidebar</b> {/section}
{section('main')} <b>main+main</b> {/section}
main.html最后会编译为:
<html>
<div> <b>main+main</b> </div>
<div> <b>sidebar+sidebar</b> </div>
</html>