5

I would like to create a product comparison view. Each product has lots of features which all need to appear in the comparison view. Each feature is a separate field in the “product” content type.

Instead of manually adding all fields of the “product” content type to my view, I’d like to have all fields added automatically to the view – for example when adding a new field to the “product” content type. Is this possible?

Bonus question: can I add all fields to the view by default and later exclude only a few of them?


Edit: Further Notes

I’d like to create a comparison table where corresponding features appear in the same row with a single row/column label for the feature. Many features are optional, though. Therefore I need the feature fields of the “product” content type to be available as separate fields in the view – so that I can properly align them in the table.

2
  • Do you have Views UI module installed ? ;)
    – niksmac
    Dec 4, 2012 at 10:41
  • 1
    @NikhilM Sure :-) I’m just wondering whether I’m not seeing the wood for the trees …
    – Chriki
    Dec 4, 2012 at 11:20

1 Answer 1

1

According to me the best way to configure a view is to use display modes ("Show: content" and select the display mode). So that when I add a field to a content type I just have to configure the "Manage Display" sections (1 per view mode) of the content type.

Note that sometimes I need extra fields to render, to use as token for other settings (rewrite a field, header/footer text, more link,...) or to make grouping. To achieve this I switch the "Show" option to fields and add a "Content: Rendered Node" field (that comes with Entity API module). Then the "Show complete entity" display option of this field allows you to choose a display mode (Full content, teaser, list item or any other display mode) and render the nodes.

1
  • Thank you for your answer which describes a really interesting idea. Unfortunately for my particular use case this idea doesn’t help. I admit, though, that this couldn’t be inferred from my original question (which I will update accordingly in a minute).
    – Chriki
    Feb 5, 2013 at 16:13

Your Answer

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

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