Blogs list - infinite scroll

appetals's picture
appetals
Wed, 03/30/2016 - 02:28
#1
Blogs list - infinite scroll

Hi,

I'm using masonary display for blogs list. Also, i have setup infinte scroll option for the block view. But infinite scroll is not working, instead it gives pagination.

phuonght's picture
phuonght
Thu, 03/31/2016 - 03:33

Hi,

By default our theme has no infinite scroll so if you would like to use it, please send us your site admin account and FTP account, we will help you.

phuonght's picture
phuonght
Thu, 03/31/2016 - 06:26

Sorry,

We can not access. Could you check?

phuonght's picture
phuonght
Fri, 04/01/2016 - 04:47

We have done all works. Please check /blogs.

1. go to file sites\all\themes\md_make\theme_setting\front\html.preprocess.inc, delete or uncomment line

drupal_add_js("{$path_theme}/js/libs/view_load/views_infinite_scroll.js", array('type' => 'file', 'scope' => 'footer'));

2. file sites\all\themes\md_make\template.php

find section

if ($view->query->pager->plugin_name == 'infinite_scroll' 

... 

drupal_add_js(path_to_theme() . "/js/libs/view_load/views_infinite_scroll.js", array('type' => 'file', 'scope' => 'footer'));
}

then replace with

if ($view->name == 'portfolio' || $view->name == 'portfolio_space' || $view->name == 'portfolio_space_footer_text' && $view->current_display != 'block_1') {
drupal_add_js(path_to_theme() . '/js/libs/view_load/jquery.autopager-1.0.0.js');
drupal_add_js(path_to_theme() . '/js/libs/view_load/imagesloaded.min.js');
drupal_add_js(path_to_theme() . '/js/libs/view_load/views_infinite_scroll.js', array('type' => 'file', 'scope' => 'footer'));
}

if($view->current_display == 'block_1' ){
drupal_add_js(path_to_theme() . '/js/libs/view_load/jquery.autopager-1.0.0.js');
drupal_add_js(path_to_theme() . '/js/libs/view_load/imagesloaded.min.js');
drupal_add_js(path_to_theme() . "/js/libs/view_load/views_infinite_scroll_2.js", array('type' => 'file', 'scope' => 'footer'));
}

3 . add file sites\all\themes\md_make\js\libs\view_load\views_infinite_scroll_2.js

4. file /sites/all/themes/md_make/templates/views/block/blog/new-block/views-view--blog--block-1.tpl.php

replace line 55

<div class="row blog-masonry"> 

with

<div class="row blog-masonry view-content">

5. file /sites/all/themes/md_make/templates/views/block/blog/new-block/views-view-unformatted--blog--block-1.tpl.php

replace line 11 :

<div class="grid-item col-md-4 col-sm-6 col-xs-12 "> 

with 

<div class="grid-item views-row  col-md-4 col-sm-6 col-xs-12 ">
appetals's picture
appetals
Fri, 04/01/2016 - 04:47

Can you please inform the changes, as we need to implement on the live server.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.