{"id":71,"date":"2020-01-29T18:48:00","date_gmt":"2020-01-29T18:48:00","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=71"},"modified":"2024-02-06T08:14:44","modified_gmt":"2024-02-06T13:14:44","slug":"displaying-multiple-fields-in-a-single-line-in-drupal-views","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/displaying-multiple-fields-in-a-single-line-in-drupal-views\/","title":{"rendered":"Displaying multiple fields in a single line in drupal views"},"content":{"rendered":"\n<p>Suppose you have three fields (Title, field_city, field_country) to display in your view. By default they will display in three separate lines as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Benjamin Franklin\nPhiladelphia \nUSA<\/code><\/pre>\n\n\n\n<p>To display this information in a single line, you need to edit the third field. Expand Rewrite Results, then type in the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Title], &#91;field_city], &#91;field_country]<\/code><\/pre>\n\n\n\n<p>This will result in the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Benjamin Franklin, Philadelphia, USA <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Suppose you have three fields (Title, field_city, field_country) to display in your view. By default they will display in three separate lines as follows: To display this information in a single line, you need to edit the third field. Expand Rewrite Results, then type in the following: This will result in the following:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[21],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/71\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}