ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 视图 专辑列表模板文件 > module/Album/view/album/album/index.phtml ```php+HTML <?php $title = 'My albums'; $this->headTitle($title); ?> <h1><?= $this->escapeHtml($title) ?></h1> <p> <a href="<?= $this->url('album', ['action' => 'add']) ?>">Add new album</a> </p> <table class="table"> <tr> <th>Title</th> <th>Artist</th> <th>&nbsp;</th> </tr> <?php foreach ($albums as $album) : ?> <tr> <td><?= $this->escapeHtml($album->title) ?></td> <td><?= $this->escapeHtml($album->artist) ?></td> <td> <a href="<?= $this->url('album', ['action' => 'edit', 'id' => $album->id]) ?>">Edit</a> <a href="<?= $this->url('album', ['action' => 'delete', 'id' => $album->id]) ?>">Delete</a> </td> </tr> <?php endforeach; ?> </table> ```