只在首页展示: {eyou:range name='$Request.controller' value='Index' type='in'} <!--友情链接开始--> <p><strong>友情链接:</strong> {eyou:flink titlelen='20' row='20' type='1'} <a rel="nofollow" href="{$field.url}" title="{$field.title}" {$field.target}>{$field.title}</a> {/eyou:flink} </p> </div> <!--友情链接结束--> {/eyou:range}
只在列表页展示: {eyou:range name='$Request.action' value='lists' type='in'} <!--友情链接开始--> <p><strong>友情链接:</strong> {eyou:flink titlelen='20' row='20' type='1'} <a rel="nofollow" href="{$field.url}" title="{$field.title}" {$field.target}>{$field.title}</a> {/eyou:flink} </p> </div> <!--友情链接结束--> {/eyou:range}
只在内容页展示: {eyou:range name='$Request.action' value='view' type='in'} <!--友情链接开始--> <p><strong>友情链接:</strong> {eyou:flink titlelen='20' row='20' type='1'} <a rel="nofollow" href="{$field.url}" title="{$field.title}" {$field.target}>{$field.title}</a> {/eyou:flink} </p> </div> <!--友情链接结束--> {/eyou:range}
除了首页之外,都显示:: {eyou:range name='$Request.controller' value='Index' type='notin'} <!--友情链接开始--> <p><strong>友情链接:</strong> {eyou:flink titlelen='20' row='20' type='1'} <a rel="nofollow" href="{$field.url}" title="{$field.title}" {$field.target}>{$field.title}</a> {/eyou:flink} </p> </div> <!--友情链接结束--> {/eyou:range}
只在列表页、内容页显示: {eyou:range name='$Request.action' value='lists,view' type='in'} <!--友情链接开始--> <p><strong>友情链接:</strong> {eyou:flink titlelen='20' row='20' type='1'} <a rel="nofollow" href="{$field.url}" title="{$field.title}" {$field.target}>{$field.title}</a> {/eyou:flink} </p> </div> <!--友情链接结束--> {/eyou:range} 转自:http://www.eyoucms.com/help/eyoujq/677.html