<?php if ($this->display_type == ListViewBlock::DISPLAY_TYPE_HOMEPAGE) { ?> <?php if ($this->content_list != null) { ?> <?php //So I get the first content list and want to return as a Data Provider $content_list_data_provider = ListViewBlock::getContentList($this->content_list[0], null, null, ConstantDefine::CONTENT_LIST_RETURN_DATA_PROVIDER); //Get the current content List model if (isset($content_list_data_provider) && $content_list_data_provider != null) { ?> <h2><?php echo t('cms', 'From the Blog'); ?> </h2> <?php $this->widget('zii.widgets.CListView', array('viewData' => array('asset' => $this->layout_asset), 'dataProvider' => $content_list_data_provider, 'itemView' => 'common.blocks.listview.item_render', 'summaryText' => '', 'ajaxUpdate' => true, 'enablePagination' => true, 'enableSorting' => false, 'sortableAttributes' => array())); ?> <?php } ?> <?php } }
<div name="div-block-content-<?php echo $block_model->id; ?> "> <div class="row"> <?php echo CHtml::label(Block::getLabel($block_model, 'display_type'), ''); ?> <?php echo CHtml::dropDownList("Block[display_type]", $block_model->display_type, ListViewBlock::getDisplayTypes(), array('id' => 'Block-display_type')); ?> <?php echo $form->error($model, 'display_type'); ?> </div> <div class="row"> <div class="content-box "> <div class="content-box-header"> <h3><?php echo t('site', 'Content list'); ?> </h3> </div> <div class="content-box-content" style="display: block; padding: 0 0 15px 0"> <div class="tab-content default-tab"> <ul id="content_list" style="margin:0px 0 10px 0px"> </ul>