I'm developing a module which has its own content type which has multiple fields which i want to display.
I want to output all these fields as an html table with 2 columns of which the left columns should be table headers and the right ones the table data. I'm currently using the hook preprocess to generate the table and spit it out as a new variable which can be used in a template. I don't like this setup because of two reasons:
* The display is rendered two times
* I must involve in template modifications
To tackle the above problems I will need to modify the content before it gets rendered, and in drupal 7 we have hook_page_alter which does exactly this. My option would be to remove my preprocess hook and move the theme table function inside the hook_page_alter and generate and set/unset the correct fields.
Now my questions are:
* Is hook_page_alter the correct way of displaying nodes as tables?
* If this is true, where can we find more details on how the operate/manipulate the $page variable (except the usual & limited API documentation).
NOTE: I am aware of views module, but find it not suitable. I prefer to do most things from API.