*

Nick N

  • **
  • 28 posts
Hello!
How to set pagination on home page (Lately added on our classifieds block) ?
Thank you.
« Last Edit: July 10, 2022, 01:28:02 PM by Nick N »

*

MB Themes

Re: Pagination on home page (Lately added on our classifieds) osc v8.0.2
« Reply #1 on: July 11, 2022, 11:03:56 AM »
@Nick
I am not fan of that but I think basic osclass functions could work that. If I am not wrong, pagination parameters can be read by Osclass also on home page.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 485 posts
Re: Pagination on home page (Lately added on our classifieds) osc v8.0.2
« Reply #2 on: July 11, 2022, 12:26:42 PM »
@Nick N

I think this is what you are looking for:
Paste in main.php underneath
Code: [Select]
    <?php if(is_array($recent_items) && count($recent_items) > 0) { ?>
      <?php
        $default_items 
View::newInstance()->_get('items'); 
        
View::newInstance()->_exportVariableToView('items'$recent_items);
      
?>


Code: [Select]
<div class='paginate'><?php 
     $params 
= array('total' => ceil(osc_total_active_items()/osc_default_results_per_page_at_search() ) );                         
     echo 
osc_pagination($params); ?>

</div>

*

Nick N

  • **
  • 28 posts
Re: Pagination on home page (Lately added on our classifieds) osc v8.0.2
« Reply #3 on: July 11, 2022, 03:12:02 PM »
@mwindey, thank you very much.