注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > 装修市场

设计师模块开发

更新时间:2015/09/18 访问次数:111205

创建设计师模块

T1EskhXbVbXXaeTzHZ-618-401.jpg

根据需要是否勾选 '创建less文件' 以及 '创建JS文件'

根据需要选择支持的布局形势190 550 750 950

 

 

如何创建支持多布局的设计师模块

例如我们创建的系统模块名称为 tshop-um-feichang

那么支持190布局的写法为:

   .col-sub .tshop-um-feichang,
   .col-extra .tshop-um-feichang{
       /*css*/
   }

950布局写法为:

   .grid-m0 .col-main .tshop-um-feichang,
   .grid-m0 .col-main .tshop-um-feichang{
       /*css*/
   }

750布局写法为:

   .grid-m .col-main .tshop-um-feichang,
   .grid-m0 .col-main .tshop-um-feichang,
   .grid-s5m0 .col-main .tshop-um-feichang,
   .grid-m0s5 .col-main .tshop-um-feichang{
       /*css*/
   }

 

950布局写法为:

   .grid-s5m0e5 .col-main .tshop-um-feichang,
   .grid-m0s5e5 .col-main .tshop-um-feichang,
   .grid-s5e5m0 .col-main .tshop-um-feichang,
   .grid-e5s5m0 .col-main .tshop-um-feichang,
   .grid-e5m0s5 .col-main .tshop-um-feichang,
   .grid-m0e5s5 .col-main .tshop-um-feichang{
       /*css*/
   }

创建模块配置

配置xml中我创建了一个name="hdtxt"的text类型的输入框:

   <?xml version="1.0" encoding="GBK"?>
   <module>
   <id>tshop-um-feichang</id>
   <name>大图展播模块</name>
   <file>tshop-um-feichang.php</file>
   <thumbnail>assets/images/thumbnail.jpg</thumbnail>
   <description xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">5张大图展播</description>
   <requiredCache>true</requiredCache>
   <supportedWidth>950</supportedWidth>
   <themes default="default">
       <theme name="default">
           <css>assets/stylesheets/default.css</css>
       </theme>
   </themes>
   <parameters>
       <group title="基础设置">
           <section folded="true" title="标题设置">
               <param readonly="false" ptype="text" name="hdtxt" label="标题" formType="text" description="标题文字内容">经典热卖</param>
           </section>
       </group>
   </parameters>
   </module>

在php中我可以这样调用:

   <d iv class="tb-module tshop-um tshop-um-feichang">
       <?php 
       $title = $_MODULE['hdtxt'];/*模块标题*/
       ?>
       <h 3><?=$title?></h 3>
   </d iv>

 

可以到这里查看所有支持的xml配置类型:http://newwiki.zx.taobao.com/index.php?title=XML%E9%85%8D%E7%BD%AE%E7%99%BD%E5%90%8D%E5%8D%95

FAQ

关于此文档暂时还没有FAQ
返回
顶部