I need to collect the "vid" and results for each view that displays on a given page. Ultimately, I'll be loading this data into an array to use in another part of my module. However, I'm having a very hard time understanding how to use Views hooks to retrieve information about the views on the page.
Here is what I've done:
* I've created a [module_name].views.inc file.
* I made a function in my [module_name].module file to call the [module_name]_views_api() function to register my module with the Views module.
I believe that the above steps are working correctly, but I'm not sure. I'm able to echo variables from the [module_name].views.inc file, but don't know if the Views module can see it or not.
However, when I make a function to retrieve view information using "views_get_current_view()" in the [module_name].views.inc file, it throws a white screen of death.
When I Google this function, it seems that people have no trouble loading it into a variable and then pulling the args[] out of it, but when I do it I just get white screen.
I feel like I'm close to having this nut cracked, but for some reason I just haven't been able to get the view objects to load into a variable so I can work with them. Can anyone give me some feedback as to what you think my problem might be?