Currently I have my view style set to grid (row style); but they're not displayed too nicely. Is there anyway I could modify the views grid php file so that I can have them displayed as a real table? If you set the view to table, you get all your fields as columns. I want to have something like

Feature A          x
Feature B          y

etc. so that they display nicely in a table view in iOS.

2 Answers 2


You can probably achieve this with CSS, rather than modifying the PHP - or are you saying you want to output as an actual HTML table? Views should do that for you.

  • Either way is good. I don't want to modify the table view as that's working for one of my other stuff. But I would modify the CSS for the grid view to make it display titles of the field in one column and their values in another. Do you know how to do this? Commented Aug 9, 2011 at 13:29
  • Oh, now I understand. You want to swap rows and fields. May be tricky with CSS - unless you know exactly how many rows/fields you'll always have. Can you paste the HTML that the View spits out?
    – Mike
    Commented Aug 9, 2011 at 14:08
  • I know how many rows and fields I'll have. 11 rows with title: value each. Commented Aug 9, 2011 at 14:14

If you want to change the markup, just have a look at your theme information from Views. There it will tell you what templates you need to override in your theme. You're probably looking for views-view-grid.tpl.php

Btw, theme information should be on the left column of the Views UI when you're editing your view. You need to press the link and it will load the information underneath.

  • Yep, I've found that. But I don't know what exactly to change in the CSS to make it look pretty as I want it. Any small hint would help, thanks :) Commented Aug 9, 2011 at 14:38
  • Do you have an example url?
    – ipwa
    Commented Aug 9, 2011 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.