您现在的位置是:首页 > cms教程 > 易优cms教程易优cms教程

易优TAGS自定义风格的简易方法

凌瑛昼2023-08-25易优cms教程已有人查阅

导读涉及的修改文件如下:applicationhomecontrollertags.php文件用编辑器打开他找到:if (!empty($tagind

涉及的修改文件如下:
applicationhomecontrollertags.php文件
用编辑器打开他
找到:
if (!empty($tagindexInfo)) {
$tagid = $tagindexInfo[‘id’];
$tag = $tagindexInfo[‘tag’];
在下面增加一段:
$viewfile = $tagindexInfo[‘viewfile’];
再找到:
$field_data = array(
‘tag’   => $tag,
‘tagid’   => $tagid,
下面增加一行:
‘viewfile’ => $viewfile,
再次找到:
/*模板文件*/
$viewfile = ‘lists_tags’;
将他修改为:
/*模板文件*/
if($viewfile) {
$viewfile = $viewfile;
}else{
$viewfile = ‘lists_tags’;
}
保存即可;
打开:
applicationadmincontrollerTags.php文件
找到以下代码:
/**
* 编辑
*/
public function edit()
{
if (IS_POST) {
$post = input(‘post.’);
if (empty($post[‘id’])) $this->error(‘操作异常’);
$updata = [
‘add_time’ => time(),
‘seo_title’ => !empty($post[‘tag_seo_title’]) ? $post[‘tag_seo_title’] : ”,
‘seo_keywords’ => !empty($post[‘tag_seo_keywords’]) ? $post[‘tag_seo_keywords’] : ”,
在这下面增加以下代码:
‘viewfile’ => !empty($post[‘viewfile’]) ? $post[‘viewfile’] : ”,
之后打开模板文件:applicationadmintemplatetagsedit.htm
文件
找到以下代码:
<dl class=”row”>
<dt class=”tit”>
<label for=”tag_seo_description”>SEO描述</label>
</dt>
<dd class=”opt”>
<textarea rows=”5″ cols=”60″ name=”tag_seo_description” id=”tag_seo_description” style=”height: 60px;”>{$tag.seo_description}</textarea>
<p class=”notic”>标签调用方法:{literal}{$eyou.field.seo_description}{/literal}</p>
</dd>
</dl>
在下面增加一段以下代码:
<dl class=”row”>
<dt class=”tit”>
<label for=”viewfile”>指定风格</label>
</dt>
<dd class=”opt”>
<input type=”text” name=”viewfile” id=”viewfile” value=”{$tag.viewfile}” class=”input-txt”>
<p class=”notic”>只要填写风格名称即可不包含.htm类型,比如:tagindex</p>
</dd>
</dl>

本文标签:

很赞哦! ()

相关源码

  • pbootcms网站网络公司个人作品展示类网站源码(自适应)为网站建设公司、网络服务企业打造的响应式门户解决方案,基于PbootCMS内核深度开发。采用前沿自适应架构,无缝适配手机端交互与PC端展示需求。查看源码
  • (自适应响应式)门窗定制门业带视频功能pbootcms模板下载本模板采用PbootCMS内核开发,为门窗制造、定制安装企业打造,通过可视化后台管理系统快速构建品牌官网。自适应设计确保在手机、平板、电脑等设备上均能获得优质浏览体验查看源码
  • (自适应响应式)AI智能电子科技产品pbootcms网站模板下载基于PbootCMS内核的响应式模板,为AI智能硬件、电子产品等科技企业打造,通过技术创新实现品牌数字化升级。查看源码
  • (自适应)简繁双语机械矿山矿石五金设备pbootcms源码下载本模板基于PbootCMS开发,主要面向机械五金、矿山矿石设备等行业,支持简体中文和繁体中文双语切换。采用响应式布局技术,确保在各种设备上都能获得良好的浏览体验。模板设计注重展示工业设备的专业性和技术特点,帮助企业建立可靠的线上展示平台。查看源码
  • (PC模板)工商公司注册会计财务记账pbootcms模板源码下载基于PbootCMS的工商财税行业网站系统,手工编写前端代码确保执行效率,双端自适应设计,支持后台实时更新服务价格和政策文件。查看源码
  • (PC+WAP)地暖热水器烘干机节能设备网站模板下载为地暖热水器及节能设备企业设计的PbootCMS网站模板,集成产品展示、节能方案介绍、技术参数说明等专业模块。采用PC与移动端同步响应架构查看源码
分享笔记 (共有 篇笔记)
验证码:

本栏推荐