[e:loop]前后样式不同的调用方式

毒药      75阅读

以标签<?=$bqno?>为钩子

[e:loop={0,3,13,1,'firsttitle=4','newstime DESC'}]
<?php
if($bqno==1)
{
$ys='class="carousel-item active"';
}

 else
{
$ys='class="carousel-item"';
 }
?>

<div <?=$ys?>>
    <img src="<?=$bqr['titlepic']?>" alt="<?=$bqr['oldtitle']?>">
    <div class="carousel-caption d-none d-md-block">
      <h5><?=$bqr['title']?></h5>
      <p><?=$bqr['smalltext']?></p>
    </div>
  </div>
[/e:loop]

注意区分“<?=$bqno?>”
[e:loop={0,3,13,1,'firsttitle=4','newstime DESC'}]
<?php
if($bqno==1)
{
$ys='class="carousel-item active"';
}

 else
{
$ys='class="carousel-item"';
 }
?>

<div <?=$ys?>><span><?=$bqno?></span>
    <img src="<?=$bqr['titlepic']?>" alt="<?=$bqr['oldtitle']?>">
    <div class="carousel-caption d-none d-md-block">
      <h5><?=$bqr['title']?></h5>
      <p><?=$bqr['smalltext']?></p>
    </div>
  </div>
[/e:loop]

   75阅读
目前尚无回复
登录 后发表评论