=======视频播放地址和下载地址标签=======
{maccms:foreach name="obj.vod_play_list" id="vo"} <div class="ui-box marg" id="playlist_1"> <div class="down-title"> <h2>{$vo.from}-在线播放</h2><span>[{$vo.player_info.tip}]</span> </div> <div class="video_list fn-clear"> {maccms:foreach name="vo.urls" id="vo2"} <a href="{:mac_url_vod_play($obj,['sid'=>$vo.sid,'nid'=>$vo2.nid])}" >{$vo2.name}</a> {/maccms:foreach} </div> </div> {/maccms:foreach}
{maccms:foreach name="obj.vod_down_list" id="vo"} <div class="ui-box marg" id="downlist_1"> <div class="down-title"> <h2>{$vo.from}-下载</h2><span>[{$vo.player_info.tip}]</span> </div> <div class="video_list fn-clear"> {maccms:foreach name="vo.urls" id="vo2"} <a href="{:mac_url_vod_down($obj,['sid'=>$vo.sid,'nid'=>$vo2.nid])}" >{$vo2.name}</a> {/maccms:foreach} </div> </div> {/maccms:foreach}
如何在播放页或下载页只显示当前分组的地址呢?外层循环标签不变,只需要加一个判断就可以了。 {maccms:foreach name="obj.vod_play_list" id="vo"} {if condition="$vo.sid eq $param.sid"} ---------------------重点是这句if判断 <div class="ui-box marg" id="playlist_1"> <div class="down-title"> <h2>{$vo.from}-在线播放</h2><span>[{$vo.player_info.tip}]</span> </div> <div class="video_list fn-clear"> {maccms:foreach name="vo.urls" id="vo2"} <a href="{:mac_url_vod_play($obj,['sid'=>$vo.sid,'nid'=>$vo2.nid])}" >{$vo2.name}</a> {/maccms:foreach} </div> </div> {/if} {/maccms:foreach}
上边循环过程中,其中获取播放器详细信息的方法是 {$vo.player_info.from} 编码 {$vo.player_info.show} 名称 {$vo.player_info.des} 备注 {$vo.player_info.tip} 提示 {$vo.player_info.sort} 排序 {$vo.player_info.parse} 解析接口 {$vo.from} 播放器编码 {$vo.note} 备注 {$vo.url} url地址 {$vo.url_count} 集数
|