文字

SDCMS标签-制作幻灯片模块

制作幻灯片模块

步骤

第一种方法:【推荐】

在后台扩展》广告处,添加一个广告分类;

然后添加图片广告,添加的时候选择对应的分类

然后记下该分类的id,使用广告代码调取


第二种方法:

在后台栏目处,添加一个外链接作为一级栏目;

在此栏目下,添加子栏目作为幻灯片图片,上传图片

记下该一级栏目的id,调用图片的时候使用

查询logo【一个图】

{sdcms:rs top="1" field="fileurl,url,title" table="sd_expand_ad" where="islock=1 and classid=1" order="ordnum,id"}{rs:eof}没有广告{/rs:eof}
<a href="{$rs[url]}" target="_blank"><img src="{$rs[fileurl]}" alt="{$rs[title]}" width="740" height="230" /></a>
{/sdcms:rs}

==========内页banner======

{if catepic=""}默认图片{else}{catepic}{/if}

广告调取【推荐】

{sdcms:rs top="5" field="fileurl,url,title" table="sd_expand_ad" where="islock=1 and classid=1" order="ordnum,id"}
{rs:eof}没有广告{/rs:eof}
<li><a href="{$rs[url]}" target="_blank"><img src="{$rs[fileurl]}" alt="{$rs[title]}" width="740" height="230" /></a></li>
{/sdcms:rs}

查询扩展分类名称

{sdcms:rs top="1" field="classname" table="sd_expand_class" where="classid=1"}
分类名称:{$rs[classname]}
{/sdcms:rs}