I recently stumbled upon the useful function views_theme() that allows you to programmatically display a view using the "theming layer." Since most people usually will be passing in SQL rows from a database into the views_theme() function to supply the data for the view, it works fine in such cases. However, I'm wanting to pass in my own custom data that doesn't come from an SQL database to be displayed in the view. Is there a way to do this? If so, what is the (array) layout to follow?
Comments
Comment #1
mscdex commentedTo clarify my original statement... I basically just want to use the table layout of the views module to display some data. I would just supply some header titles for each column and then supply an array of "rows" containing the sequential data to "fit" the columns. Is this doable, or do I have to code something entirely from scratch to do such a layout?
Comment #2
merlinofchaos commentedViews can't display arbitrary data, it has to know rather a lot about it.
However, Views also uses Drupal's built in table rendering. Perhaps you should look into theme_table which, from the sound of it, will do what you want reasonably well.