use common\includes\DataSource; use common\includes\UrlUtility; use common\includes\CommonUtility; ?> <?php $channel = $this->getChannel($id); $style = $index % 2 === 0 ? ' floatLeft' : ' floatRight'; ?> <div class="tbox border <?php echo $style; ?> " style="width:49%;"> <div class="middleTitle2"> <h2><?php echo UrlUtility::getChannelLink($channel['id']); ?> </h2> </div> <ul class="imgTxtContent1 size95x95"> <?php $dataSource = DataSource::getContentByChannel($channel['id'], ['is_pic' => true, 'limit' => 1]); echo LoopData::widget(['dataSource' => $dataSource, 'item' => 'item-imgtxt1', 'length' => 13]); ?> </ul> <ul class="txtContent dot"> <?php echo LoopData::widget(['dataSource' => $row, 'length' => 18]); ?> </ul> </div>
echo UrlUtility::getChannelLink(105); ?> </h2> </div> <ul class="txtContent"> <?php $dataSource = DataSource::getContentByChannel(105, ['limit' => 5]); echo LoopData::widget(['dataSource' => $dataSource]); ?> </ul> </div> <div class="tbox dot"> <div class="middleTitle2"> <h2><?php echo UrlUtility::getChannelLink(106); ?> </h2> </div> <div class="ad"> <a href="http://forum.china.com.cn/hot/jf/"><img src="http://images.china.cn/attachement/jpg/site1000/20140606/7427ea210a0214fb640305.jpg" border="0" width="307" height="64" style="margin:0 0 15px 2px;" alt="《交锋》栏目" /></a> </div> <ul class="txtContent"> <?php $dataSource = DataSource::getContentByChannel(106, ['limit' => 2]); echo LoopData::widget(['dataSource' => $dataSource]); ?> </ul> </div> </div> </div>