热搜词
发表于 2017-7-23 12:26:19 | 显示全部楼层 |阅读模式
江湖家居至尊版为自己研发的PHP框架,使用Smarty模板插件,模板目录为 themes ,模板文件扩展名为.html,模板文件是由静态元素和定界符“<{$函数名}>”组成的。

变量标签:
<{$CONFIG.site.title}>       网站标题
<{$CONFIG.mobile.url}>    手机版域名
<{$CONFIG.site.phone}>   网站客服电话
<{$MEMBER.mobile}>   会员手机号码
<{$member.uname}>  会员名称

<{$item.desc}>  文章描述
<{$item.link}>     列表页链接
<{$pager.img}>  列表页图片
<{$item.logo}>  列表页logo
<{$item.name}> 列表页名称
<{$iteration}>
<{$item.company_url}>  列表页公司网址


包含其它文件块标签:
<{include file="block/header.html"}>  //引入别的文件,此例为引入模板目录\themes\ 内的文件。

<{widget id="public/kefu"}>   //调用窗口小部件,在\system\plugins\widgets\ 目录内

<{adv id="12" name="商城首页轮转下方图片广告" city_id=$request.city_id}>   //调用广告位

<{link ctl='index'}>          //调用控制器中的方法,控制器在 \system\home\controllers\目录内,此例为调用首页控制器文件index.ctl.php中的 index 方法(类中的函数)。 此例实为跳转到PC版首页URL

<{link ctl='news'}>             //调用控制器中的方法,此例为调用news.ctl.php文件中的index方法(类中的函数)。
<{link ctl='news:detail' }>">    //调用控制器中的方法,  此例为调用news.ctl.php文件中的 detail 方法。


流程控制语句标签:

<{KT name="首页推荐热门活动" city_id=$request.city_id limit="2"}>      //推荐位标签

<{calldata mdl='article/article' cat_id=$v.cat_id audit='1' hidden='0' closed=0 limit=3}>...<{/calldata}>  //自动调取数据模型的标签,本例为调取装修课堂

<{calldata mdl="company/news" city_id=$request.city_id order="viewsESC" limit="6"}>...<{/calldata}>     //自动调取数据模型的标签,本例为调取本地新闻

<{foreach $items_shop as $item}>...<{/foreach}>

order="datelineESC"    //按发布时间从大到小排序
order="viewsESC"      //按浏览量从大到小排序

其它:
%THEME%/static/images/  用户模板目录内静态图片目录








全部评论2
灰儿 发表于 2017-9-17 14:51:03 | 显示全部楼层
江湖家居模版中“KT”标签详解
http://www.admin365.cn/thread-40612-1-1.html
江湖家居模板中“widge”标签详解
http://www.admin365.cn/thread-40616-1-1.html
回复

使用道具 举报

灰儿 发表于 2017-9-17 15:05:04 | 显示全部楼层
调用广告位标签:下面看代码

<{widget id="adv" name="首页横幅1000px可关闭" city_id=$request.city_id limit="1"}>

<{AD name="首页头部轮转广告" city_id=$request.city_id limit="3"}>
<div style="height:320px;"><a href="<{$item.link}>" title="<{$item.title}>" target="_blank"><img src="<{$pager.img}>/<{$item.thumb}>" /></a></div>
<{/AD}>

广告位 上面2中方式的都支持!

第一种是封装好的挂件!
第二种是因为广告区域格式有特殊变化!

name="*****" 这个在后台就代表了 某个广告位!

回复

使用道具 举报

回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-7-4 02:51 , Processed in 0.170583 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team