在前端網站的模板中,為了更高效的讀取數據,內容管理系統定義了常用的標簽。
## 1.導航標簽
```
{cms:nav id='r'}
<a href="{$r.url}">{$r.title}</a>
{/cms:nav}
```
## 2.列表標簽
```
{cms:list model='article'}
<a href="{$r.url}">{$r.title}</a>
{/cms:list}
```
## 3.內容標簽
```
{cms:show model='product' id='9' withdata='true' }
{$vo.title}<br>
{:htmlspecialchars_decode($vo.content)}
{/cms:show}
```
## 4.區塊標簽
```
{cms:block id='1' field='title' /}
```
## 5.輪播圖標簽
```
{cms:switch id='1' /}
```
## 6.面包屑標簽
```
{cms:crumbs catid='$catid'}
```
## 7.上一頁 / 下一頁
```
<div class='otherPage'>
<div class='prevBox'>上一個:{cms:prev id='$id'}</div>
<div class='nextBox'>下一個:{cms:next id='$id'}</div>
</div>
```