views:

37

answers:

1

Hi!

Does anyone know how to implement the Live Update Module into Views?

The module is found here: drupal.org/project/live_update (still too green to post more than one link)

And a short example is provided here: Question and Answers: Using Drupal and the Live Update module.

The module, and thereby live update, works out of the box on both comments and on example.com/node

I'm using the modules Organic Groups and Views to sort data for every user and I would like to get those views live updated, without a new pageload, when someone posts something (createing a new node).

So what I actual want's is to implement Live Update in my views, correct me if I'm wrong.

Is that possible using Live Update by implementing it into the views template?

Any help is appreciated!

/Martin

A: 

Martin, the exemaple on the URL that you provided explains that

We will be doing this by using hook_init().

and he continues explaining that

This isn't best practice as we will have to make a check every page load.

and the better solution would be to

A better way is to use the Drupal 6.x Preprocessing Awesomness and load live_update when the view is being loaded. However, since preprocessing views from modules is currently complicated we will be using hook_init() for this exercise.

I hope I could help. Please let me know if I can help you more.

João Guilherme
Thanks João! I have tried to be a little more specific about what I want to do
Martin