苹果CMS V10模板开发代码合集
苹果CMS V10模板开发代码合集
后台LOGO调用
<a class="logo" href="{$maccms.path}">
<img class="img-responsive hidden-xs" src="{$maccms.site_logo|mac_url_img}" style="height:58px"/>
<img class="img-responsive visible-xs" src="{$maccms.site_waplogo|mac_url_img}" style="height:60px"/>
</a>
首页网址调用
{:Request()->domain()}
首页轮播图调用
{maccms:vod num="6" paging="no" type="all" level="9" order="asc" by="sort"}
<div class="swiper-slide"><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}"><img src="{$vo.vod_pic_slide}" /> <p>{$vo.vod_name}</p></a></div>
{/maccms:vod}
调用指定分类下的视频
{maccms:vod order="asc" by="rnd" num="4" type="4" }
<a title="{$vo.vod_name}" href="{:mac_url_vod_detail($vo)} " >{$vo.vod_name}</a>
{/maccms:vod}
调用指定分类下的子分类
{maccms:type ids="2" order="asc" by="sort" id="vo1"}
{$key} 序号
{$vo1.type_id} ID
{$vo1.type_name} ID分类名称
{$vo1.type_en} 拼音
{$vo1.type_pid} 父分类ID
{$vo1.type_sort} 排序
{$vo1.type_title} SEO标题
{$vo1.type_key} SEO关键字
{$vo1.type_des} SEO描述
{:mac_url_type($vo1)} ID分类网址
{maccms:type parent="'.$vo1['type_id'].'" order="asc" by="sort" id="vo2"}
{$vo2.type_id} ID
{$vo2.type_name} 子分类名称
{$vo2.type_en} 拼音
{$vo2.type_pid} 父分类ID
{$vo2.type_sort} 排序
{$vo2.type_title} SEO标题
{$vo2.type_key} SEO关键字
{$vo2.type_des} SEO描述
{:mac_url_type($vo2)} 子分类网址
{/maccms:type}
{/maccms:type}
示例:
{maccms:type ids="1" num="8" order="asc" by="sort" id="vo1"}
{maccms:type parent="'.$vo1['type_id'].'" order="asc" by="sort" id="vo2"}
<span class="channel"><a href="{:mac_url_type($vo2)}">{$vo2.type_name}</a></span>
{/maccms:type}
{/maccms:type}
资讯页调用当前子分类
{maccms:type ids="current" order="asc" by="sort"}
<li class="swiper-slide{if condition="$vo.type_name eq $obj.type_name"} active{/if}"><a href="{:mac_url_type($vo)}">{$vo.type_name}</a></li>
{/maccms:type}
首页调用热门资讯
{maccms:art num="16" order="desc" by="sort"}
<li class="list2 text-overflow{if condition="($key > 10) "} layout-xx{/if}">
<em class="key">{$key}.</em><a href="{:mac_url_art_detail($vo)}" title="{$vo.art_name}">{$vo.art_name}</a>
</li>
{/maccms:art}
热门视频
{maccms:vod num="16" type="1" order="desc" by="sort"}
<li class="list2 text-overflow{if condition="($key > 10) "} layout-xx{/if}">
<em class="key">{$key}.</em><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}">{$vo.vod_name}</a>
</li>
{/maccms:vod}
首页调用专题
{maccms:topic num="1"}
<div class="title clearfix">
<h3 class="theme"><i class="rred fa {if condition="($key == 1)"}fa-video-camera{else /}fa-github-alt{/if}"></i> 影视专题</h3>
<a href="{:mac_url_topic_index()}" target="_blank" class="more more-arrow fr">更多</a>
</div>
<ul class="fed-list-info fed-list-img fed-part-rows clearfix">
{maccms:topic num="8" 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_topic_detail($vo)}">
<img data-src="{$vo.topic_pic|mac_url_img}" src="{$vo.topic_pic|mac_url_img}" class="thumb" alt="{$vo.topic_name}">
{$vo.topic_name}
</a>
</li>
{/maccms:topic}
</ul>
{/maccms:topic}
调用当前分类下的推荐
{maccms:vod num="9" type="current" level="9" order="desc" by="time"}
<li><a target="_blank" href="{:mac_url_vod_detail($vo)}"><img class="loading" src="{$maccms.path_tpl}images/no.jpg" data-original="{:mac_url_img($vo.vod_pic)}" alt="{$vo.vod_name}"></a></li>
{/maccms:vod}
调用所有分类下的推荐
{maccms:vod num="9" level="9" order="desc" by="time"}
<li><a target="_blank" href="{:mac_url_vod_detail($vo)}"><img class="loading" src="{$maccms.path_tpl}images/no.jpg" data-original="{:mac_url_img($vo.vod_pic)}" alt="{$vo.vod_name}"></a></li>
{/maccms:vod}
影片标签:
<p class="list-item"><span>类型:</span><span>{$obj.vod_class|mac_url_create='class'}</span></p>
<p class="list-item"><span>地区:</span><span>{$obj.vod_area|mac_url_create='area'}</span></p>
<p class="list-item"><span>年份:</span><span>{$obj.vod_year|mac_url_create='year'}</span></p>
<p class="list-item"><span>状态:</span><span class="data_style">{if condition="$obj.vod_remarks neq ''"}{$obj.vod_remarks}{elseif condition="$obj.vod_serial gt 0"}第{$obj.vod_serial}集{else /}已完结{/if}</span></p>
<p class="list-item"><span>主演:</span><span>{$obj.vod_actor|mac_url_create='actor'|mac_default='未知'}</span></p>
<p class="list-item"><span>导演:</span><span>{$obj.vod_director|mac_url_create='director'|mac_default='未知'}</span></p>
<p class="list-item"><span>标签:</span><span>{$obj.vod_tag|mac_url_create='tag','vod','search'}</span></p>
<p class="list-item"><span>简介:</span><span>{$obj.vod_content|mac_filter_html|mac_substring=55|mac_default='暂无简介'}</span></p>