Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
can this Module work with Views module? It would be a pretty cool feature!
Comments
Comment #1
jonskulski CreditAttribution: jonskulski commentedIt would be The Killer Feature. Unfortunately, to address this in an all-encompassing general way is not easy or efficient. (but I am open to ideas!).
The problem is there now say, 'okay we have a new node now find all the views that node, a part of it or use to display some other content.' So we would end up having to on update or inserts for: taxonomy, comments, users, nodes generate all views html and store them.
In specific cases, this is not a hard problem and I will write up an example to give some direction.
Comment #2
leovarg CreditAttribution: leovarg commentedwhat about for an specific view page! with the path "/frontage", how it should work? i was trying to modify the existing live_update_blog module replacing the path "blog/all"... with "frontpage" But i was not able to make it work.
Comment #3
lelizondo CreditAttribution: lelizondo commentedany example I could use?
Comment #4
lelizondo CreditAttribution: lelizondo commentedThis is what I've done to make it work (somehow) with views.
First, create a view, let's make it simple, so choose 'Node' in 'Row Style'. I don't know if this is going to work with fields. For filters I have two filters, 'Published' and 'Node Type = Youtube'. Youtube is just a simple content type with videos.
Don't create a page, the default display is enough. Call your view 'vcall', that's how I called it, just remember you'll be using this name later.
Next, you'll have to create two modules, the first one is very simple, all you have to do is implement hook_menu and vcall_page.
I'm calling my module 'vcall', let's see the code of vcall.module:
We are only defining a new menu item, 'vcall', when visiting 'http://example.com/vcall' we'll be loading the 'vcall_page' function and this function will load the 'vcall' view via views_embed_view() (Are you still with me? If not, read this paragraph again :)
Enable the module and visit http://example.com/vcall you should see some content.
Finally, we'll be creating another module, 'live_update_vcall', this one will do the magic. Let's see the code, I actually took it from the blog module.
Enable the module and then try it.
Finally, if anyone has a better and simpler idea, please let us know, and please, if I'm wrong please correct me..
Comment #5
mbasfour CreditAttribution: mbasfour commentedsubscribing
Comment #6
Hany Albeshry CreditAttribution: Hany Albeshry commentedThank you..I have tried it and it works, any idea how to implement this in views with row style: fields?
Comment #7
mbasfour CreditAttribution: mbasfour commentedi want a views integration that let the views change it's content when there is new content i mean :
when a new node is added to the view or deleted from the view the view updated automatically without refreshing the page
i need this with the default functionality to live update to refresh the node content when i edit it .
Comment #8
Nathaniel CreditAttribution: Nathaniel commentedYou might want to try changing this line:
To something like this: