开发者

Implement Live Update into Views

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜