I have a small php code that pulls data from the web as an array. Each array element is a formatted html. Is it possible to use views to present this data? I must present it in views because other modules use views to format it further.

I've found this interesting article about custom view fields only the problem is that in my case I need my table to have only the virtual field and nothing else, so the views SELECT statement won't be based on anything - how to simulate this? I can't find a handler for SELECT statement.

Comments

raincloud’s picture

Issue summary: View changes

edit

dawehner’s picture

Well sure you could write a views query plugin which pulls the data as you have in your php code.

For example http://drupal.org/project/views_xml_backend http://drupal.org/project/lastfm and many more.
With this you can bring basically any kind of data into views.

raincloud’s picture

Thanks for suggestions, I will try to follow the XML example because it is (I think) the most close to my needs. It would be the thing I am looking for if it allowed to pass the xml dynamically, not through a file. E.g. instead of typing the xml file name in the Views UI Advanced section, type any MyClassName->MyXMLContent and maybe perhaps MyClassName->MyXMLSchema method names (and ensure these class/methods exist in code (where?) and return valid XML). But this approach would not be for end-user obviously. Actually XML is very sophisticated solution and I thought of something much simpler, that is a simple one text column display of dynamic HTML content and I thought something like this exists.

dawehner’s picture

Status: Active » Fixed

Let's mark the issue as solved as you have a start how to implement it.

Maybe it also would make sense to put the data into the database using feeds. Then things are much easier after it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

edit