dedecms问题:前台调用后台,实现后台控制前台
这一看就是写死的,只能再模板中改。
<a><img src="/skin/images/banner1jpg"></a>
这都写的无比明显了啊,只是没有写href=而已。
<a href="http://wwwbaiducom"><img src="/skin/images/banner1jpg"></a>
var atmdateA = [{"is_url":"0","url_controller":"","url_action":"","url_para":"","pic_path":"images\/bannerjpg","title":"banner1","href":"","url":"\/skin\/images\/banner1jpg"},{"is_url":"0","url_controller":"Product","url_action":"index","url_para":"id=3&cd=4&md=5","pic_path":"images\/bannerjpg","title":"banner","href":"","url":"\/skin\/images\/bannerjpg"}];
$(document)ready(function(){
var bannerShow = new Atm();
bannerShowslide(atmdateA,"banner","1920","450");
});
复制这个,改变大小路径就好了
这个简单,织梦后台有上传文件功能,你只需要吧所有都按顺序命名,比如:banner1jpg、banner2jpg、banner3jpg等等,然后把传到指定的文件夹。
然后在后台的基本参数增加新变量,变量名为:cfg_banner,如下图
接着我们拿images文件夹为例子,模板中这样写:
<img src="/images/banner{dede:globalcfg_banner/}jpg">
这样你只需在后台修改数字1、2、3、4就可以改变相应了
0条评论