Timeline for Getting Views Rows Data in Custom Module
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 22, 2013 at 1:27 | history | edited | Triskelion | CC BY-SA 3.0 |
added 672 characters in body
|
Mar 21, 2013 at 23:09 | comment | added | Jeremy Love | sure, i am in the drupal chat chat.stackexchange.com/rooms/327/drupal-answers | |
Mar 21, 2013 at 23:06 | comment | added | Triskelion |
If you check out the API your function would be better written as function custom_module_views_pre_render(&$view) and invoking views_get_current_view should not be unnecessary. I also assumed that the image you present above is what you are getting, perhaps mistakenly. I think we are still working at cross purpose. Perhaps we can move this to chat and try to drill down in the issue.
|
|
Mar 21, 2013 at 19:39 | comment | added | Jeremy Love | Thanks for replying, Ive actually tried this a few times and in the data its not printing out the views results that are being displayed on screen like the image field and the result counter, its prints out the data of the nodes and the settings of the views, but I cant specify which node to render if the latest node is always being changed. Any other suggestions? | |
Mar 21, 2013 at 18:26 | comment | added | Triskelion |
If the static variable is not working, then the program is being bootstrapped between pages. The view must still keep track of its pagination. Try placing watchdog('custom module' '<pre>' . print_r($vars) . '</pre>') within your code. Load two pages and look at your log to see how the view tracks its location. Then you know which property to test.
|
|
Mar 21, 2013 at 17:26 | comment | added | Jeremy Love | I wish i was over thinking it but this simply isnt the case, I tried using static to make the function only execute once and it executes every time a new page is loaded, this time I tried your version as well and it didn't work. Any other suggestions? | |
Mar 21, 2013 at 15:30 | history | edited | Triskelion | CC BY-SA 3.0 |
added 1 characters in body
|
Mar 21, 2013 at 15:23 | history | answered | Triskelion | CC BY-SA 3.0 |