Skip to main content
removed thanks
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I'm trying to build an infinite scroll with views using a custom ajax callback function, every view has only 1 node displayed. What I would like to do is use the offset to load the correct view. To be clear, I already tried views infinite scroll and infinite scroll modules and for various reasons I cannot use them.

What I got so far is this:

$view = views_get_view('frontpage');
$view->set_items_per_page(1);
$view->set_offset($offset);

$view->execute_display();

This gives me back the right markup with the right node.

My question is, what if I want to process the node loaded in the view before getting back the markup? Is this possible? I've looked through the view API multiple time without finding something suitable.

Thanks in advance.

I'm trying to build an infinite scroll with views using a custom ajax callback function, every view has only 1 node displayed. What I would like to do is use the offset to load the correct view. To be clear, I already tried views infinite scroll and infinite scroll modules and for various reasons I cannot use them.

What I got so far is this:

$view = views_get_view('frontpage');
$view->set_items_per_page(1);
$view->set_offset($offset);

$view->execute_display();

This gives me back the right markup with the right node.

My question is, what if I want to process the node loaded in the view before getting back the markup? Is this possible? I've looked through the view API multiple time without finding something suitable.

Thanks in advance.

I'm trying to build an infinite scroll with views using a custom ajax callback function, every view has only 1 node displayed. What I would like to do is use the offset to load the correct view. To be clear, I already tried views infinite scroll and infinite scroll modules and for various reasons I cannot use them.

What I got so far is this:

$view = views_get_view('frontpage');
$view->set_items_per_page(1);
$view->set_offset($offset);

$view->execute_display();

This gives me back the right markup with the right node.

My question is, what if I want to process the node loaded in the view before getting back the markup? Is this possible? I've looked through the view API multiple time without finding something suitable.

Source Link
Ende Neu
  • 190
  • 1
  • 9

Get view and process content

I'm trying to build an infinite scroll with views using a custom ajax callback function, every view has only 1 node displayed. What I would like to do is use the offset to load the correct view. To be clear, I already tried views infinite scroll and infinite scroll modules and for various reasons I cannot use them.

What I got so far is this:

$view = views_get_view('frontpage');
$view->set_items_per_page(1);
$view->set_offset($offset);

$view->execute_display();

This gives me back the right markup with the right node.

My question is, what if I want to process the node loaded in the view before getting back the markup? Is this possible? I've looked through the view API multiple time without finding something suitable.

Thanks in advance.