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

易优CMS标签uitype在模板文件index.htm中调用指定栏目可视化切换

春翠2025-04-17易优cms教程已有人查阅

导读描述:栏目编辑,比uitext、uihtml、uiupload标签多了一个typeid属性,使用时结合html一起才能完成可视化布局,只针对具有可视化功能的模

【基础用法】
标签:uitype
描述:栏目编辑,比uitext、uihtml、uiupload标签多了一个typeid属性,使用时结合html一起才能完成可视化布局,只针对具有可视化功能的模板。用法:
<div class="eyou-edit" e-id="文件模板里唯一的数字ID" e-page='文件模板名' e-type="type">
{eyou:uitype typeid='栏目ID' e-id='必须与上面的数字ID一致' e-page='必须与上面的文件模板名一致' id='field'} 这里嵌套模板标签代码
{/eyou:uitype}
</div>
属性: typeid='' 栏目ID e-id='' 每个模板文件里唯一的数字ID,必须与uihtml标签外层的html元素标签e-id保持一致 e-page='' 页面分组,假设模板文件是index.htm,那么e-page的值是index id='' 可以任意指定循环里的变量名替代field,假设id='field1',模板调用如:{$field.value} 变成 {$field1.value}
涉及表字段: 无
【更多示例】
-------------------------------示例1--------------------------------
描述:在模板文件index.htm中调用uitype标签,实现指定栏目可视化切换的效果。
<!DOCTYPE html>
<html>
<head>
<title>EyouCms企业建站系统</title>
</head>
<body>
<div>
<div class="eyou-edit" e-id="400" e-page='index' e-type="type">
<!-- uitype可视化标签调用 start -->
{eyou:uitype typeid='2' e-id='400' e-page='index' id='field'}
{eyou:type type='self' empty='栏目不存在时,显示这里的文案'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:uitype}
<!-- uitype可视化标签调用 end -->
</div>
</div>
<!-- 可视化模板必须引入的ui标签 start -->
{eyou:ui open='off' /}
<!-- 可视化模板必须引入的ui标签 end -->
</body>
</html>
-------------------------------示例2--------------------------------
描述:在模板文件lists_article.htm中调用uitype标签,实现指定栏目可视化切换的效果。
<!DOCTYPE html>
<html>
<head>
<title>EyouCms企业建站系统</title>
</head>
<body>
<div>
<div class="eyou-edit" e-id="400" e-page='lists_article' e-type="type">
<!-- uitype可视化标签调用 start -->
{eyou:uitype typeid='2' e-id='400' e-page='lists_article' id='field'}
{eyou:type type='self' empty='栏目不存在时,显示这里的文案'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:uitype}
<!-- uitype可视化标签调用 end -->
</div>
</div>
<!-- 可视化模板必须引入的ui标签 start -->
{eyou:ui open='off' /}
<!-- 可视化模板必须引入的ui标签 end -->
</body>
</html>
-------------------------------示例3--------------------------------
描述:在模板文件index.htm中,多处调用uitype标签的写法。
<!DOCTYPE html>
<html>
<head>
<title>EyouCms企业建站系统</title>
</head>
<body>
<div>
<!-- 第一次调用uitype标签 start -->
<div class="eyou-edit" e-id="400" e-page='index' e-type="type">
<!-- uitype可视化标签调用 start -->
{eyou:uitype typeid='2' e-id='400' e-page='index' id='field'}
{eyou:type type='self' empty='栏目不存在时,显示这里的文案'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:uitype}
<!-- uitype可视化标签调用 end -->
</div>
<!-- 第一次调用uitype标签 end -->
<!-- 第二次调用uitype标签 start -->
<div class="eyou-edit" e-id="401" e-page='index' e-type="type">
<!-- uitype可视化标签调用 start -->
{eyou:uitype e-id='401' e-page='index' id='field'}
{eyou:type type='self' empty='栏目不存在时,显示这里的文案'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:uitype}
<!-- uitype可视化标签调用 end -->
</div>
<!-- 第二次调用uitype标签 end -->
</div>
<!-- 可视化模板必须引入的ui标签 start -->
{eyou:ui open='off' /}
<!-- 可视化模板必须引入的ui标签 end -->
</body>
</html>
-------------------------------示例4--------------------------------
描述:在模板文件index.htm中,多处调用uitype标签的写法,只在html最外层元素指定一次e-page属性值。
<!DOCTYPE html>
<html>
<head>
<title>EyouCms企业建站系统</title>
</head>
<body>
<div e-page='index'>
<!-- 最外层指定e-page属性值,里面html元素<a>可以不再指定e-page属性值 -->
<!-- 第一次调用uitype标签 start -->
<div class="eyou-edit" e-id="400" e-type="type">
<!-- uitype可视化标签调用 start -->
{eyou:uitype typeid='2' e-id='400' e-page='index' id='field'}
{eyou:type type='self' empty='栏目不存在时,显示这里的文案'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:uitype}
<!-- uitype可视化标签调用 end -->
</div>
<!-- 第一次调用uitype标签 end -->
<!-- 第二次调用uitype标签 start -->
<div class="eyou-edit" e-id="401" e-type="type">
<!-- uitype可视化标签调用 start -->
{eyou:uitype typeid='2' e-id='401' e-page='index' id='field'}
{eyou:type type='self' empty='栏目不存在时,显示这里的文案'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:uitype}
<!-- uitype可视化标签调用 end -->
</div>
<!-- 第二次调用uitype标签 end -->
</div>
<!-- 可视化模板必须引入的ui标签 start -->
{eyou:ui open='off' /}
<!-- 可视化模板必须引入的ui标签 end -->
</body>
</html>

本文标签:

很赞哦! ()

相关源码

  • (PC+WAP)pbootcms模板黑色门窗定制五金建材网站下载为门窗定制与五金建材企业设计的网站解决方案,采用PbootCMS开发,兼具专业展示与营销功能。黑色系设计突显工业质感,响应式布局确保在手机、平板等设备上的浏览体验。通过简单的内容替换,也可适用于建材贸易、家具定制等相关行业。查看源码
  • (自适应响应式)陶瓷研磨盘抛光机械设备pbootcms网站模板本模板基于PbootCMS系统开发,为研磨抛光设备制造企业设计,特别适合陶瓷研磨盘、抛光设备等表面处理设备展示。采用响应式布局技术,确保各类设备的参数和工艺在不同终端上都能清晰呈现。查看源码
  • (自适应响应式)黑色LED显示屏户外广告屏网站源码下载这是一款基于PbootCMS内核开发的响应式网站模板,专门为LED显示屏及户外广告行业打造。模板适配各类显示设备,帮助企业快速搭建专业官网,展示产品与服务优势,有效提升品牌形象。查看源码
  • (自适应)电子元件电路板元器件pbootcms网站源码下载为电子元器件、电路板制造类企业设计,特别适合展示产品参数、技术规格等内容。采用响应式技术,确保各类电子元件在不同设备上都能清晰展示。查看源码
  • pbootcms模板(PC+WAP)火锅加盟餐饮美食类带留言源码基于PbootCMS内核深度开发,为火锅、餐饮品牌打造的营销型解决方案。采用红色主题传递行业活力,实现PC与WAP端适配。查看源码
  • (自适应响应式)门窗定制门业带视频功能pbootcms模板下载本模板采用PbootCMS内核开发,为门窗制造、定制安装企业打造,通过可视化后台管理系统快速构建品牌官网。自适应设计确保在手机、平板、电脑等设备上均能获得优质浏览体验查看源码
分享笔记 (共有 篇笔记)
验证码:

本栏推荐