0

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.

0

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? – Sorin Cioban Aug 9 '11 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 Aug 9 '11 at 14:08
  • I know how many rows and fields I'll have. 11 rows with title: value each. – Sorin Cioban Aug 9 '11 at 14:14
0

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 :) – Sorin Cioban Aug 9 '11 at 14:38
  • Do you have an example url? – ipwa Aug 9 '11 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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