{//基础模板文件} {block name="header"} {include file="public/header" /} {/block} {block name="main"}主体部分{/block} {block name="footer"} {include file="public/footer" /} {/block} {//子模板} {extend name="base" /} {//将父模板中的main区块进行重写} {block name="main"} <h1>{__block__}我是子模板</h1> {/block}