Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class td_smart_list_7 extends td_smart_list {
- protected $use_pagination = true; // set this to true to use rela pagination on this template
- protected function render_before_list_wrap() {
- if(td_global::$cur_single_template_sidebar_pos == 'no_sidebar') {
- $td_class_nr_of_columns = ' td-3-columns ';
- } else {
- $td_class_nr_of_columns = ' td-2-columns ';
- }
- $buffy = '';
- //wrapper with id for smart list wrapper type 7
- $buffy .= '<div class="td_smart_list_7' . $td_class_nr_of_columns . '">';
- return $buffy;
- }
- protected function render_list_item($item_array, $current_item_id, $current_item_number, $total_items_number) {
- //print_r($item_array);
- $buffy = '';
- // render the pagination
- //$buffy .= $this->callback_render_pagination();
- //custom ad slot 1
- $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'custom_ad_1'));
- //creating each slide
- $buffy .= '<div class="td-item">';
- $buffy .= '<h2><span class="td-sml-current-item-title">' . $current_item_number. '. ' . $item_array['title'] . '</span></h2>';
- //adding description
- if(!empty($item_array['description'])) {
- $buffy .= '<span class="td-sml-description">' . $item_array['description'] . '</span>';
- }
- // ad smart list 6
- $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'smart_list_7'));
- // render the pagination
- $buffy .= $this->callback_render_pagination();
- $buffy .= '</div>';
- //custom ad slot 2
- $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'custom_ad_2'));
- return $buffy;
- }
- protected function render_after_list_wrap() {
- $buffy = '';
- $buffy .= '</div>'; // /.td_smart_list_7 wrapper with id
- return $buffy;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment