学做网站培训课程介绍

当前位置:

苹果CMS模板制作开发常用标签汇总

调用指定ID分类下的文章


{maccms:vod num="8" type="1,2" order="desc" by="hits"}

<li><div class="v-pic"><img data-src="{$vo.vod_pic}" class="thumb" alt="{$vo.vod_name}"><div class="v-tips">{include file="public/serial1"}</div><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}" class="v-playBtn"><i></i></a></div><div class="v-txt"><span class="v-tit"><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}">{$vo.vod_name}</a></span></div></li>

{/maccms:vod}

 

导航菜单


{maccms:type num="10" order="asc" by="sort" ids="parent"}
<li {if condition="($vo.type_id eq MAC_TYPE_ID || $vo.type_id eq MAC_TYPE_PID)"}class="active"{/if}><a href="{:mac_url_type($vo)}">{$vo.type_name}</a></li>
{/maccms:type}

导航调用带当前样式


<li {if condition="$maccms.aid eq 1"}class="active"{/if}><a href="//{$maccms.site_url} " title="首页">首页</a></li>
{maccms:type ids="parent" order="asc" by="sort"}
<li {$vo.type_id}={$vo.type_pid} {if condition="($vo.type_id eq $GLOBALS['type_id'] || $vo.type_id eq $GLOBALS['type_pid'])"} class="active"{/if}><a href="{:mac_url_type($vo)}">{$vo.type_name}</a></li>
{/maccms:type}

 

导航调用资讯栏目带下拉


{maccms:type order="asc" by="sort" mid="2" ids="parent"}
<li class="layui-nav-item"> <a href="{:mac_url_type($vo)}">{$vo.type_name}</a>
<dl class="layui-nav-child">
{maccms:type parent="'.$vo['type_id'].'" order="asc" by="sort" id="vo2" key="key2"}
<dd><a href="{:mac_url_type($vo2,[],'show')}">{$vo2.type_name}</a></dd>
{/maccms:type}
</dl>
</li>
{/maccms:type}

影片各类信息


<img src="{:mac_url_img($obj.vod_pic)}" alt="{$obj.vod_name}" />

<p class="data"><span class="text-muted">主演:</span>{$obj.vod_actor|mac_substring=30|mac_url_create='actor'}</p>
<p class="data"><span class="text-muted">导演:</span>{$obj.vod_director|mac_url_create='director'}</p>
<p class="data"><span class="text-muted">标签:</span>{$obj.vod_tag|mac_url_create='tag','vod','search'}</p>
<p class="data"><span class="text-muted">更新:</span>{$obj.vod_time|date='Y-m-d h:m:s',###}</p>
<p class="data">
<span class="text-muted">类型:</span>{$obj.vod_class|mac_url_create='class'}</p>
<p class="data">
<span class="text-muted">地区:</span>{$obj.vod_area|mac_url_create='area'}</p>
<p class="data">
<span class="text-muted">年份:</span>{$obj.vod_year|mac_url_create='year'}</p>
<p class="data">
<span class="text-muted">语言:</span>{$obj.vod_lang|mac_url_create='lang'}
</p>
<p class="data">
<span class="text-muted">评分:</span>{$obj.vod_score}
</p>

播放线路调用


<!-- 播放地址 -->
<div class="stui-pannel clearfix" id="bofy">
<div class="stui-pannel__head clearfix">
<h3 class="title">播放地址</h3>
</div>
<div class="tabseee">
<div class="content">
{maccms:foreach name="obj.vod_play_list" id="vo"}
<section>
<h2>{$vo.player_info.show}</h2>
<ul class="stui-content__playlist clearfix">
{maccms:foreach name="vo.urls" id="vo2"}
<li {if condition="$param.sid eq $vo.sid && $param.nid eq $vo2.nid"}class="active"{/if}><a href="{:mac_url_vod_play($obj,['sid'=>$vo.sid,'nid'=>$vo2.nid])}">{$vo2.name}</a></li>
{/maccms:foreach}
</ul>
</section>
{/maccms:foreach}
</div>
</div>
</div>
<!-- end 播放地址 -->

.tabseee li{display:inline-block;padding:3px 10px;border:1px solid #f60;margin:10px 3px;}
.tabseee li:hover{background:#f60;color:#fff}

播放页相关推荐


<section class="container">
<div class="title">
<h2>看了还看</h2>
</div>
<div class="row">
<ul class="list clearfix">
{maccms:vod num="15" rel="'.$obj['vod_rel_vod'].'" order="desc" by="time"}
<li>
<article>
<a class="cover" href="{:mac_url_vod_play($vo)}"> <img src="{:mac_url_img($vo.vod_pic)}" class="b-lazy b-error" alt="{$vo.vod_name}" /></a>
<header>
<h3><a href="{$vo.vod_play_url}">{$vo.vod_name}</a></h3>
</header>
</article> </li>

{/maccms:vod}
</ul>
<div class="clearfix0"></div>
</div>
</section>

 

调用轮播图


<div id="slideBox" class="slideBox clearfix">
<div class="container bnne">
<div id="content" class="row">
<div class="col-xs col-sm-12 col-md-12">
<div class="hd">
<ul>{maccms:vod num="4" paging="no" type="all" level="9" order="desc" by="sort"}
<li></li>
{/maccms:vod}</ul>
</div>
<div class="bd">
<ul>
{maccms:vod num="4" paging="no" type="all" level="9" order="desc" by="sort"}
<li><a href="{:mac_url_vod_detail($vo)}"><img src="{$vo.vod_pic_slide|mac_url_img}" /></a></li>
{/maccms:vod}
</ul>
</div>

<!-- 下面是前/后按钮代码,如果不需要删除即可 -->
<a class="prev" href="javascript:void(0)"></a>
<a class="next" href="javascript:void(0)"></a>

</div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(".slideBox").slide({mainCell:".bd ul",effect:"top",autoPlay:true});
</script>

/* 本例子css */
.slideBox{ width:100%; height:400px; overflow:hidden; position:relative; border:0px solid #ddd; background:#000;margin-bottom:30px }
ol,ul{list-style:none;margin:0;padding:0;}
.slideBox .hd{ height:15px; overflow:hidden; position:absolute; right:5px; bottom:15px; z-index:1;width:100%;text-align:center; }
.slideBox .hd ul{ loverflow:hidden; zoom:1; text-align:center; }
.slideBox .hd ul li{ display:inline-block;margin-right:2px; width:15px; height:15px;border-radius:50%; line-height:14px; text-align:center; background:#fff; cursor:pointer; }
.slideBox .hd ul li.on{ background:#f00; color:#fff; }
.slideBox .bd{ position:relative; height:100%; z-index:0; }
.slideBox .bd li{ zoom:1; vertical-align:middle; }
.slideBox .bd img{ width:100%; height:400px; display:block; }

/* 下面是前/后按钮代码,如果不需要删除即可 */
.slideBox .prev,
.slideBox .next{ position:absolute; left:3%; top:50%; margin-top:-25px; display:block; width:32px; height:40px; background:url(../slider-arrow.png) -110px 5px no-repeat; filter:alpha(opacity=50);opacity:0.5; }
.slideBox .next{ left:auto; right:3%; background-position:8px 5px; }
.slideBox .prev:hover,
.slideBox .next:hover{ filter:alpha(opacity=100);opacity:1; }
.slideBox .prevStop{ display:none; }
.slideBox .nextStop{ display:none; }

 

首页调用所有版块及文章


{maccms:type ids="1,2,3,4" order="asc" by="sort"}
<div class="col-xs col-sm-12 col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">{$vo.type_name}</h2>
<div class="imore fright"><a href="{:mac_url_type($vo)}">更多>></a></a></div>
<span class="act act-sub">已收录超过 <strong>{:mac_data_count($vo.type_id,'all')}</strong>{$vo.type_name}</span>
</div>
<div class="panel-body panel-padding">
<ul class="videos">
{maccms:vod num="10" type="'.$vo['type_id'].'" start="24" order="desc" by="time" id="vo2" key="key2"}
<li>
<div class="video">
<a href="{:mac_url_vod_play($vo2)}" title="{$vo2.vod_name}" class="thumbnail" target="_blank">
<div class="video-thumb">
<img src="{:mac_url_img($vo2.vod_pic)}" alt="{$vo2.vod_name}" />
</div>
<span class="video-title">{$vo2.vod_name}</span>

<div class="video-details hidden-xs hidden-sm">
<span class="pull-left">{$vo2.vod_time|date='Y-m-d',###}</span>
<span class="pull-right text-right">{$vo2.vod_hits} 次播放</span>
</div>
</a>
</div>
</li>
{/maccms:vod}
</ul>

</div>
</div>
</div>
{/maccms:type}

调用资讯版块


<div class="fed-part-layout fed-back-whits">
<div class="fed-list-head fed-part-rows fed-padding">
<h2 class="fed-font-xvi">最新影讯</h2>
</div>
<ul class="fed-list-info fed-list-img fed-part-rows clearfix">
{maccms:art num="10" type="current" order="desc" by="time"}
<li class="fed-list-item fed-padding fed-col-xs6 fed-col-sm4 fed-col-md3{if$key>3} fed-hide-sm fed-show-md-block{/if}">
<a class="fed-list-title fed-font-xiv fed-text-center fed-text-sm-left fed-visible fed-part-eone" href="{:mac_url_art_detail($vo)}">
<img data-src="{$vo.art_pic}" src="{$vo.art_pic}" class="thumb" alt="{$vo.art_name}">
{$vo.art_name}
</a>
</li>
{/maccms:art}
</ul>
</div>

.none{display:none;}
.floatLeft,.fleft {float: left;}
.floatRight,.fright {float: right;}
.clearFloat:after,.clearfix:after{clear: both;content: ".";display: block;height: 0;font-size: 0;visibility: hidden;}
.clearFloat,.clearfix {*zoom:1;}
.fed-back-whits{padding:20px;}

.fed-back-whits h2{font-size: 18px; line-height: 70px;}

.mb20{margin-bottom:20px}

.fed-back-whits li{width:19%;float:left;margin-right:1.25%;margin-bottom:20px}
.fed-back-whits li:nth-child(5n){margin-right:0}
.fed-back-whits li img{width:100%;height:140px}

@media (max-width:767px){
.fed-back-whits li{width:48%;margin:10px 1% !important}
}

.single-main .article-header{padding:20px 0;text-align:center;}
.single-main .article-header em{font-style:normal}
.single-main .article-content{line-height:2.2em;padding:20px;background:#fff}
.single-main .article-content img{max-width:100%;height:auto;margin:auto;display:block}

 

调用资讯版块,带子分类

 


{maccms:type ids="5" order="asc" by="sort" id="vo5" key="key5"}
<div class="con11 margin-bottom-share">
<div class="splendid fl">
<div class="splendid-header">
<div class="fl"><a target="_blank" href="{:mac_url_type($vo5)}"><span>热门</span>{$vo5.type_name}</a></div>
<ul class="splendid-tab fl">
{maccms:type parent="'.$vo5['type_id'].'" order="asc" by="sort" id="vo1" key="key1"}
<li {if condition="$key1==1"}class="active-style2"{/if}><a href="javascript:;">{$vo1.type_name}</a></li>
{/maccms:type}
</ul>
</div>
<div class="splendid-content">
{maccms:type parent="'.$vo5['type_id'].'" order="asc" by="sort" id="vo1" key="key1"}
<div class="splendid-content-inner" {if condition="$key1==1"}style="display:block;"{/if}>
{maccms:art num="1" type="'.$vo1['type_id'].'" order="desc" by="time" id="vo2" key="key2"}
<div class="sci-left fl">
<a href="{:mac_url_art_detail($vo2)}" target="_blank">
<div class="sci-left-pic">
<img class="scrollLoading" data-url="{$vo2.art_pic|mac_url_img}" src="{$maccms.path_tpl}images/pic.png" width="350" height="300" alt="{$vo2.art_name}">
</div>
<div class="shade"></div>
<div class="pic-title">
<div>{$vo2.art_name|mac_substring=10}</div>
<p>{$vo2.art_content|mac_filter_html|mac_substring=25}</p>
</div>
</a>
</div>
{/maccms:art}
<div class="sci-right fr">
<ul class="sci-right-ul">
{maccms:art num="6" type="'.$vo1['type_id'].'" start="2" order="desc" by="time" id="vo2" key="key2"}
<li>
<a href="{:mac_url_art_detail($vo2)}" class="sru-pic" target="_blank"><img class="scrollLoading" data-url="{$vo2.art_pic|mac_url_img}" width="160" height="100" src="{$maccms.path_tpl}images/pic.png" alt="{$vo2.art_name}">
</a>
<div class="movie-headline1 mhi1"><a href="{:mac_url_art_detail($vo2)}">{$vo2.art_name|mac_substring=10}</a></div>
<p>{$vo2.art_content|mac_filter_html|mac_substring=20}</p>
</li>
{/maccms:art}
</ul>
</div>
</div>
{/maccms:type}
</div>
</div>
<div class="recommend fr">
<div class="recommend-header">
<div class="fl"><span>推荐</span>更新</div>
</div>
<div class="recommend-content">
<ul class="recommend-list">
{maccms:art num="1" type="'.$vo5['type_id'].'" order="desc" by="hits_day" id="vo2" key="key2"}
<li>
<a href="{:mac_url_art_detail($vo2)}" class="recommend-list-pic fl" target="_blank"><img class="scrollLoading" data-url="{$vo2.art_pic|mac_url_img}" width="80" height="110" src="{$maccms.path_tpl}images/pic.png" alt=""></a>
<div class="recommend-list-con fr">
<div class="movie-headline2"><a href="{:mac_url_art_detail($vo2)}">{$vo2.art_name}</a></div>
<p>{$vo2.art_content|mac_filter_html|mac_substring=35}</p>
</div>
</li>
{/maccms:art}
</ul>
<ul class="recommend-list-two">
{maccms:art num="5" type="'.$vo5['type_id'].'" start="2" order="desc" by="hits_day" id="vo2" key="key2"}
<li><span>阅读:{$vo2.art_hits}</span><a href="{:mac_url_art_detail($vo2)}" target="_blank">{$vo2.art_name}</a></li>
{/maccms:art}
</ul>
</div>
</div>
</div>
{/maccms:type}

 

从指定数开始


start="11"

调用TAG


{$obj.vod_tag|mac_url_create='tag'}

域名调用


{$maccms.site_url}

邮箱


{$maccms.site_email}

网站名称


{$maccms.site_name}

网站URL


{$maccms.site_url}

默认LOGO调用


{$maccms.site_logo|mac_default='statics/img/logo.png'|mac_url_img}

默认手机LOGO调用


{$maccms.site_waplogo|mac_default='statics/img/logo_min.png'|mac_url_img}

模板路径调用


{$maccms.path_tpl}

{$obj.type_id} 分类id
{$obj.type_id_1} 一级分类id
{$obj.type} 视频分类对象,二级属性可参考分类
{$obj.type_1} 一级分类对象,二级属性可参考分类 -->

版权


Copyright © {:date('Y')} {$maccms.site_url} Inc.<span class="fed-hide-xs"> All Rights Reserved.</span>

CSS调用路径:


placeholder : maccms.template+"/images/load.gif",

调用专题


{maccms:topic num="1"}
<div class="fed-topi-info fed-part-layout fed-back-whits fed-part-rows">
<div class="fed-list-head fed-part-rows fed-padding">
<h2 class="fed-font-xvi">专题</h2>
<ul class="fed-part-tips fed-padding">
<li><a class="fed-more" href="{:mac_url_topic_index()}">更多</a></li>
</ul>
</div>
<ul class="fed-list-info fed-part-rows">
{maccms:topic num="3" order="desc" by="time"}
<li class="fed-list-item fed-padding fed-col-xs12 fed-col-sm6 fed-col-md4{if$key>2} fed-hide-sm fed-show-md-block{/if}">
<a class="fed-list-pics fed-lazy fed-part-2by1" href="{:mac_url_topic_detail($vo)}" data-original="{$vo.topic_pic|mac_url_img}">
<div class="fed-topi-back">
<span class="fed-list-title fed-visible fed-font-xvi fed-text-white fed-text-center"><i class="fed-icon-font fed-icon-zhuanti"></i>专题</span>
<span class="fed-list-name fed-visible fed-font-xvi fed-text-white fed-text-center">—— {$vo.topic_rel_vod|explode=',',###|count}个影片 ——</span>
<span class="fed-list-count fed-visible fed-font-xvi fed-text-white fed-text-center">{$vo.topic_name}</span>
</div>
</a>
</li>
{/maccms:topic}
</ul>
</div>
{/maccms:topic}

 

调用子分类


{maccms:type ids="1" order="asc" by="sort"}
<ul class="aleft"><strong class="movv">{$vo.type_name}</strong>
{maccms:type parent="'.$vo['type_id'].'" order="asc" by="sort" id="vo1" key="key1"}
<h2><a href="{:mac_url_type($vo1,[],'show')}">{$vo1.type_name}</a></h2>{if condition="$key1==7"}{else /}<em>|</em>{/if}
{/maccms:type}
</ul>
{/maccms:type}

 

调用每个栏目下的小子分类

[cce_php]<div class="index_mcid ui-boxb">
{maccms:type ids="1,2,3,4" order="asc" by="sort"}
<ul class="aleft t rxx">
<h2><a href="{:mac_url_type($vo)}">{$vo.type_name}</a></h2>
{maccms:foreach name=":explode(',',$vo.type_extend.class)" id="vo1" key="key1"}{if condition="$key1 lt 18"}
<a href="{:mac_url_type($vo,['class'=>$vo1],'show')}" title="{$vo1}">{$vo1}</a>
{/if}{/maccms:foreach}
</ul>
{/maccms:type}
</div>
[cce_php]

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

相关教程

  • 我们使用织梦建网站时,往往需要在列表页调用文章缩略图来显示。常用的方法就是使用[field:picname/]标签来调用文章的后台的缩略图。但如果想调用文章
  • 现在使用织梦做网站的站长很多,织梦网站的登录是有一个专门的登录后台,很多站长在开发网站时,为了更方便登录,会将注册登录框放到前台顶部,如下图
  • Dedecms系统有强大的会员系统,在后台可以管理会员和管理会员投稿信息。默认情况下DEDE投稿只允许会员投稿,不支持游客投稿的,那么怎么在自己做网站
  • DEDECMS开发网站时,怎么实现DEDECMS会员注册和登录后直接跳转首页呢?下面介绍一下设置方法。方法/步骤DEDECMS设置会员登录返回网站首页步骤:打
  • 织梦网站安装后如果想重新安装,该怎么操作呢?下面简单的介绍一下织梦建站安装后怎么重新安装的方法。方法/步骤在浏览器输入网站域名及织梦登录地
  • 学习了织梦建站教程之后,使用DEDE织梦网站建好,为了防止一些攻击,需要经常的进行数据备份。下面学做网站论坛介绍一下DEDE织梦网站怎样进行数据源码
  • Dede织梦后台有一个自带的采集功能,通过这个采集功能可以自动采集文章,并且可以自动发布到自己的网站上。那么Dede织梦后台采集功能怎么使用呢?下面
  • 织梦网站经常会出现一些小BUG,今天介绍一下织梦网站常见的小问题。当我们将一个织梦网站进行搬家后,织梦上传到空间后{dede:global.cfg_webname/}等
  • 为了网站安全考虑,DEDE做网站前台发布文章默认是有验证码的,如果想去除网站前台发布文章验证码,可以使用下面的方法进行设置。第一种方法可以直接
  • 默认情况下,使用织梦建网站后,所有生成的文章目录都是放在一个a文件夹里,这样就导致了所有网站页面的URL网址中,都包含了一个a目录,例如:www.xue