0

I have a content type that is loaded with 1000's of records. These are not shown through any custom view as of right now. I have multiple fields I would like to combine into a single field.

For example:

field_one, field_two, field_three

...combine above into single field:

field_combined

I don't need to do any calculations, I would just like to combine them into one field when the content type page is displayed.

2
  • 1
    Could you have another go at explaining this? It doesn't really make sense at the moment. What is a "content type default view"? Are you talking about entity fields or views fields? What do you mean by "combine", where is that data coming from, and what format is it in now? Pretend you're explaining it to someone who has never seen your site before, and has no idea what it does (which of course is true for everyone reading this)
    – Clive
    Commented May 7, 2014 at 17:41
  • Hi Clive, thanks. I am stubling over words as I figure out drupal here :) Commented May 7, 2014 at 17:58

1 Answer 1

0

To do what you want, one way is to create a new view, something like this should work I think:

  • Create a new view of the content type you wish to include
  • Set display format to Table
  • Add the fields you want combined to the Fields section
  • Arrange them in the order in which you want them displayed
  • Under format: Table | Settings, choose which column you want ALL of these fields to appear in and select that for each

This should present a new view with all of those fields in one column, and any other data as you see fit in other columns. You may need to adjust some styling to get them to format properly - for example, text is inline, so to have it appear on a separate line, you will need to wrap it a DIV or something like.

3
  • Thanks for the reply. I can do it this way, but it does not keep the original url that drupal gives without the view. for example: site.com/color/blue is the given url. How do I keep that url and apply this view? Commented May 7, 2014 at 21:17
  • Not sure I understand... you want the view to have the same path as the original content?
    – Geoff
    Commented May 7, 2014 at 22:45
  • I had another thought. It occurred to me that a custom template file would likely produce what you are looking for. I suspect you would want a custom node template for the content type - in this you can set it up to display the data however you like. I wont include a specific link because are dozens of good resources out there - do a search for custom node template and you should find the information you need.
    – Geoff
    Commented May 8, 2014 at 2:12

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.