友情链接表有以下字段可以调用
字段
| 说明
| 其他说明
|
---|
link_id | 链接id
|
|
cate_id | 分类id
|
|
name | 链接名称 |
|
logo | 链接logo图片
|
|
url | 链接地址
|
|
hits | 点击量
|
|
网站导航表有以下字段可以调用
{link table="db_links" field="link_id,name,url" orderby="sequence"}
{link:loop}
[link:i] 排序
[link:link_id] 链接id
[link:cate_id] 链接分类id
[link:name] 链接名称
[link:logo] 链接logo图片
[link:url] 链接地址
[link:hits] 点击量
{/link:loop}
{/link}
示例
<div class="flinks">
<span class="heading">友情链接:</span>
{link table="db_links" orderby="sequence"}
{link:loop}<a href="[link:url]" i="[link:i]" onclick="OW.link.count([link:link_id])" target="_blank">[link:name]</a>{/link:loop}
{/link}
</div>
{link table="db_links" cate_id="1"}
{link:loop}<a href="[link:url]" i="[link:i]" onclick="OW.link.count([link:link_id])" target="_blank">[link:name]</a>{/link:loop}
{/link}
直接写sql语句的调用方法示例
{link table="ow_links" sql="select * from ow_links where cate_id=3 order by sequence"}
{link:loop}
<a href="[link:url]" i="[link:i]" onclick="OW.link.count([link:link_id])" target="_blank">[link:name]</a>
{/link:loop}
{/link}