調(diào)用友情鏈接范例
一、調(diào)用文字友鏈接(沒有圖標(biāo))
{if $_Y['basescript'] == 'index' && $links['text']} <dl> <dt>友情鏈接:</dt> {foreach $links['text'] as $v} <dl><a href="{$v['url']}" target="_blank">{$v['title']}</a></dl> {/foreach} </dl> {/if}
二、調(diào)用圖標(biāo)友情鏈接
{if $_Y['basescript'] == 'index' && $links['text']} <dl> <dt>友情鏈接:</dt> {foreach $links['text'] as $v} <dl><img src="{$v['pic']}@100w_200h.{$v['picsuffix']}" width="100" height="200" alt="{$v['title']}" /><a href="{$v['url']}" target="_blank">{$v['title']}</a></dl> {/foreach} </dl> {/if}
三、將所有友情鏈接以文字的形式調(diào)用出來(lái)
{if $_Y['basescript'] == 'index' && $links['text']} <dl> <dt>友情鏈接:</dt> {foreach $links['text'] as $v} <dl><a href="{$v['url']}" target="_blank">{$v['title']}</a></dl> {/foreach} {foreach $links['pic'] as $v} <dl><a href="{$v['url']}" target="_blank">{$v['title']}</a></dl> {/foreach} </dl> {/if}