苹果CMS文章详情教程
作者 :
发布时间:2026-09-21 18:27:30
共人阅读
文件目录html/art/detail.html
页面aid值14
当前影片数组$obj
必带参id
友情提示:影片数据在详情页全字段输出 到{$obj}数组,如下查询全部字段 可以参考视频字段,或者在模板用{:print_r($obj)}打印当前影片全部数据,其他如播放地址或剧情等等需要用函数处理并且遍历处相列表。
详情常用示例:
文章内容
<h1>{$obj.art_name} - {$obj.art_page_list[$param['page']]['title']}</h1><div class="source"> 来源:{$obj.art_from} 发布时间:{$obj.art_time|date='Y-m-d H:i:s',###} 浏览次数:{$obj.art_hits}</div><div class="content">{$obj.art_page_list[$param['page']]['content']|mac_url_content_img}</div><!-- 可使用通用分页类获取文章内容分页 --><!-- 上下篇 --><div class="next"> {php} $where=[]; $where['art_status'] = ['eq',1]; $where['art_id'] = ['lt',$obj['art_id']]; $pre_info = model('art')->infoData($where,'*',1); $where['art_id'] = ['gt',$obj['art_id']]; $next_info = model('art')->infoData($where,'*',1); {/php} {if condition="$pre_info['code'] eq 1"} <a href="{:mac_url_art_detail($pre_info['info'])}" >上一篇:{$pre_info['info']['art_name']}</a> {/if} {if condition="$next_info['code'] eq 1"} <a href="{:mac_url_art_detail($next_info['info'])}" >下一篇:{$next_info['info']['art_name']}</a> {/if}</div>
1、本站资源均收集与网络,仅供学习与参考,请勿用于商业用途。
2、禁止恶意使用本站资源从事违法行为,一律用于者承担。
3、本站资源版权均归原作者所有,如需商业,请购买正版。
4、转载或引用本网站内容须注明原网址,并标明本网站网址:www.laiac.com
2、禁止恶意使用本站资源从事违法行为,一律用于者承担。
3、本站资源版权均归原作者所有,如需商业,请购买正版。
4、转载或引用本网站内容须注明原网址,并标明本网站网址:www.laiac.com




