# Yii2在模板中快速引入另外一个模板文件，类似include

**URL:** <https://www.shiqidu.com/t/topic/455>\
**Category:** 开发调优\
**Tags:** Yii\
**Created:** [2018 年7 月 6 日 15:33 UTC](https://www.shiqidu.com/t/topic/455 "2018-07-06T15:33:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![Leon](https://www.shiqidu.com/user_avatar/www.shiqidu.com/leon/32/5_2.png) [@Leon](https://www.shiqidu.com/u/Leon)\
发布日期： [2018 年7 月 6 日 15:33 UTC](https://www.shiqidu.com/t/topic/455/1 "2018-07-06T15:33:41Z")

</div>

```html
<?php if (!empty($feeds)):?>
<?php foreach ($feeds as $feed):?>
<?=$this->render('/item/feed_item.php', ['feed' => $feed])?>
<?php endforeach;?>
<?php else:?>
    <div class="text-center pd-5"><?=Yii::t('app', 'no_more_data')?></div>
<?php endif;?>

```
