Guest User

Untitled

a guest
Oct 26th, 2015
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. class td_smart_list_7 extends td_smart_list {
  5.  
  6. protected $use_pagination = true; // set this to true to use rela pagination on this template
  7.  
  8.  
  9. protected function render_before_list_wrap() {
  10. if(td_global::$cur_single_template_sidebar_pos == 'no_sidebar') {
  11. $td_class_nr_of_columns = ' td-3-columns ';
  12. } else {
  13. $td_class_nr_of_columns = ' td-2-columns ';
  14. }
  15.  
  16. $buffy = '';
  17.  
  18. //wrapper with id for smart list wrapper type 7
  19. $buffy .= '<div class="td_smart_list_7' . $td_class_nr_of_columns . '">';
  20.  
  21. return $buffy;
  22. }
  23.  
  24.  
  25. protected function render_list_item($item_array, $current_item_id, $current_item_number, $total_items_number) {
  26. //print_r($item_array);
  27. $buffy = '';
  28.  
  29. // render the pagination
  30. //$buffy .= $this->callback_render_pagination();
  31.  
  32. //custom ad slot 1
  33. $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'custom_ad_1'));
  34. //creating each slide
  35. $buffy .= '<div class="td-item">';
  36. $buffy .= '<h2><span class="td-sml-current-item-title">' . $current_item_number. '. ' . $item_array['title'] . '</span></h2>';
  37.  
  38.  
  39.  
  40. //adding description
  41. if(!empty($item_array['description'])) {
  42. $buffy .= '<span class="td-sml-description">' . $item_array['description'] . '</span>';
  43. }
  44.  
  45. // ad smart list 6
  46. $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'smart_list_7'));
  47.  
  48. // render the pagination
  49. $buffy .= $this->callback_render_pagination();
  50.  
  51. $buffy .= '</div>';
  52.  
  53. //custom ad slot 2
  54. $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'custom_ad_2'));
  55.  
  56. return $buffy;
  57. }
  58.  
  59.  
  60. protected function render_after_list_wrap() {
  61. $buffy = '';
  62. $buffy .= '</div>'; // /.td_smart_list_7 wrapper with id
  63.  
  64. return $buffy;
  65. }
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. }
Advertisement
Add Comment
Please, Sign In to add comment