帝國cms內容頁上下頁的鏈接有標簽可以直接用,但如果要調用上一章的名稱和下一章的名稱卻發現沒有標簽可以用,下面說下怎樣用靈動標簽來調用章節名。
上一章節:
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id desc limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id desc limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
下一章節:
[e:loop={"select * from [!db.pre!]ecms_news where id>'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
這里用了news表,要把news改成你要查詢的表明,這樣就把帝國模板上個章節和下個章節的文章名弄出來了。