帝国CMS模板灵动标签调用留言板信息的方法

时间:2024-01-24
阅读:

帝国CMS模板开发中调用留言板内容可以使用灵动标签,方法如下:

[e:loop={'select * from [!db.pre!]enewsgbook where bid=1 and checked=0 order by lyid desc limit 1 ',0,24,0}]
用户:<?=$bqr['username']?$bqr['username']:'游客'?><br>
内容:<a href="<?=$public_r['newsurl']?>e/tool/gbook/?bid=1"><?=esub($bqr[lytext],26)?></a>
[/e:loop]

bid=留言板ID,我首页留言板ID是1,checked=0表示必须是审核过的,limit1即显示1条,<?=esub($bqr[lytext],26)?>调用留言板内容,26为控制字数。

返回顶部
顶部