0

亲爱的朋友,我有一个问题,我想在用户进入主页时显示 div

{if $smarty.server.QUERY_STRING == 'p=Home'}
<div class="dt_banner" style="float:left !important;">
  <div class="dt_content_wrap">
    <div class="dt_slider"> 
      <script src="images/jquery.cycle2.js"></script>
      <div class="cycle-slideshow" 
           data-cycle-timeout=5000
                    style="height: 318px; overflow: hidden; width: 675px;"> 
        <!-- empty element for overlay -->
        <div class="cycle-overlay custom" style="background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5); color: #FFFFFF; font-size: 20px; margin-top: -269px; padding: 15px;  position: relative;  text-transform: uppercase; z-index: 9999;"></div>
        <img src="images/adv1.png" width="675px"> <img src="images/adv2.png" width="675px"> <img src="images/adv3.png" width="675px"> <img src="images/adv4.png" width="675px"> <img src="images/adv5.png" width="675px"> <img src="images/adv6.png" width="675px"> <img src="images/adv7.png" width="675px"> <img src="images/adv8.png" width="675px"> <img src="images/adv9.png" width="675px"> </div>
    </div>
    <div class="dt_vdo_box">
      <iframe width="350" height="295" src="//www.youtube.com/embed/LlHrvr5eYhM?rel=0" frameborder="0" allowfullscreen></iframe>
    </div>
  </div>
</div>
{/if} <br clear="all">
4

1 回答 1

0

也许像这样而不是你的第一个 if 行?

{if $smarty.request.p == 'Home'}
于 2013-10-07T21:29:49.293 回答