速建时代数据管管家- 湖北速建时代网络科技有限公司
Index
资源下载
授权查询
正版授权
增值服务
帮助中心
web制作教程
api教程
LOGIN
LOGIN
Index
资源下载
授权查询
正版授权
增值服务
帮助中心
web制作教程
api教程
×
用户登录
手机号
获取验证码
验证码
登录
PHP open source website building system manager
the latest versionV4.3.0
Purchase
Download
Notice on list of infringing websites
An open letter from the user
Notice of product commercial use authorization
web制作教程
api教程
通用字段使用方式
发布日期:2022-08-01
[TOC] >通用字段调用是指在任何页面都都可调用,例如首页、列表页、单页、详情页等,无显示使用。  #### 公共文件引用方式 >通常使用在头部菜单,和底部信息分割嵌套后使用 `../template`前端文件存放目录固定不变`head.html`头部菜单切割后存放位置,不待`body`前后代码`head`可变的名称 ```php {include file="../template/head.html" } {include file="../template/banner.html" } ``` #####首页title、keywords、description >首页调用/列表页/单页/详情页均可使用`name`网站名称,`keywords`关键词`desc`描述 **大多在首页使用** ```perl <title>{$confs.name}</title> <meta name="keywords" content="{$confs.keywords}"/> <meta name="description" content="{$confs.desc}"/> ``` #####列表页/单页title、keywords、description >title调用【当前栏目名称】和【网站名称】 keywords判断当前栏目是否有keywords如何没有就调用网站keywords description判断当前栏目是否有description如何没有就调用网站description ```perl <title>{$cates.cate_name}-{$confs.name}</title> <meta name="keywords" content="{$cates.keywords?$cates.keywords:$confs.keywords}"/> <meta name="description" content="{$cates.desc?$cates.desc:$confs.desc}"/> ``` #####详情页title、keywords、description >title【调用文章表】-【网站名称】 keywords判断当前栏目是否有keywords如何没有就调用网站keywords description判断当前栏目是否有description如何没有就调用网站description ```perl <title>{$arts.title}-{$confs.name}</title> <meta name="keywords" content="{$arts.keywords?$arts.keywords:$confs.keywords}"/> <meta name="description" content="{$arts.description?$arts.description:$confs.desc}"/> ``` ##### JS、css图片引用方式 >__TEMPCSS__ 路径 当前项目下的public/static/index 目录 ```javascript <script src="__TEMPCSS__/js/jquery.min.js"></script> ``` #### 头部和底部版权分割 ##### 分割公共部分 >一般为头部:我这命名为`head.html` 可之定义 底部:我这命名为`footer.html` 可之定义 ##### 使用方式 ```perl {include file="../template/head.html"} {include file="../template/footer.html" } ``` >`template`前端页面目录名称 `head`前端切开页面 注意不带后缀`.html`,否则无效 #### 头部菜单底部菜单设置 >头部和底部显示方式一直,区别在于循环显示neme区别 `cateRes`头部显示 `botCateRes`底部显示 ```perl {volist name="cateRes" id="cate"} <li class=" {if condition="$cate['children']" }dropdown{/if} a1 {if condition=" $cate.id eq $topcid" }active{/if}"> <a href="{$cate.cate_attr|makeurl=###,$cate.id}"> {$cate.cate_name} </a> <div class="dropdown_menu"> {volist name="$cate['children']" id="cat"} <a href="{$cat.cate_attr|makeurl=###,$cat.id}"> {$cat.cate_name}</a> {/volist} </div> </li> {/volist} ``` 返回数组 ```perl 0 => array:22 [ "id" => 1 //栏目id "cate_name" => "产品下载"//栏目标题 "title" => "速建时代商城管理系统"//副标题 "keywords" => ""//关键词 "desc" => "欢迎使用由湖北速建时代网络科"//描述 "content" => "<h3 style="text-align: center;">速建时代商城管理系统</h3>"//内容 "status" => 1//状态 "jump_id" => 2//跳转栏目 "img" => ""//封面图 "cate_attr" => 1 //栏目类型 1列表页 2单页 3跳转 使用类型2【/index_tmp】类型【list_tmp】【article_tmp】无效 ,使用类型3【/article_tmp】者【index_tmp】【index_tmp】无效 "list_tmp" => "list_article.html" //跳转列表页 "index_tmp" => "index_article.html" //单页地址 "article_tmp" => "article_article.html" //内容页 "link" => "http://sjsdvideo.oss-cn-qingdao.aliyuncs.com/app/2022-06-28/v4.0.0.zip"//跳转页面 "sort" => 50//排行 "model_id" => 1 "bottom_nav" => 0//是否底部显示0显示1不显示 "pid" => 0 //顶级栏目标识 0为顶级 "mark" => "" "thumb" => 1 "uid" => 1 "children" => array:3 [//子栏目 0 => array:21 [▼ "id" => 2 "cate_name" => "资源下载" "title" => "速建时代商城管理系统" "keywords" => "" "desc" => "" "content" => "" "status" => 1 "jump_id" => 0 "img" => "" "cate_attr" => 1 "list_tmp" => "download.html" "index_tmp" => "index_article.html" "article_tmp" => "article_article.html" "link" => "" "sort" => 50 "model_id" => 1 "bottom_nav" => 0 "pid" => 1 "mark" => "news1" "thumb" => 1 "uid" => 1 ] 1 => array:21 [▶] 2 => array:21 [▶] ] ] ``` #### 通用配置 >如头部LOGO设置` {$confs.img}` 直接可显示 常用于底部版权设置 返回值 ```perl "img" => "http://sjsdvideo.oss-cn-qingdao.aliyuncs.com/2022-07-13/logo.png" //login "name" => "***PHP开源建站系统管家官方网站 - 内容管理系统-湖北速建时代信息科技网络公司" //中文名称 "siteurl" => "phpcms.hbsjsd.cn" //网站域名 "beian" => "备案号:鄂ICP备19027492号-1" //备案号 "keywords" => "***php建站"//关键词 "desc" => "***PHP开源建站"//描述 "dizhi" => "湖北省襄阳市邓城大道49号国际创新产业***7-316"//地址 "iscache" => "0"//是否开启关闭网站 "imagesurl" => "https://wxapi.hbsjsd.cn"//静态资源 "thumb" => "1"//是否开启缩略图 "lxr" => "李经理"//联系人 "zuoji" => "13487170257"//座机号 "shouji" => "19972971161"//手机号 "email" => "276255486@qq.com"//邮箱 "qq" => "276255486"//qq ```
←
上一篇:
下一篇:
→