{if isset($eyou.field.videoyoutube) && !empty($eyou.field.videoyoutube)}
<div class="layui-colla-item" id="videoSection">
<h2 class="layui-colla-title product_title_n">Video</h2>
<div class="layui-colla-content layui-show">
<div class="iframe-container">{$eyou.field.videoyoutube}</div>
</div>
</div>
{elseif isset($eyou.field.lanmushiping) && !empty($eyou.field.lanmushiping)}
<div class="layui-colla-item" id="videoSection">
<h2 class="layui-colla-title product_title_n">Video</h2>
<div class="layui-colla-content layui-show">
<div class="iframe-container">{$eyou.field.lanmushiping}</div>
</div>
</div>
{else}
{/if}
解释说明:
栏目视频:
$eyou.field.lanmushiping
产品内页视频:
$eyou.field.videoyoutube
当栏目页和产品页都有视频,优先选择 产品内页视频,都没有视频时候,内容空!
——————————————————————————————————————————
不知道还有没有更简单的写法??就能实现这样的功能?