Chapter 7. Field Rewrites

Up to this point, we have used Views to create different aggregations of data, displayed in a variety of ways: lists, tables, galleries, maps, accordions, and so on. We just displayed content titles, teasers, and used fields to create custom displays of data for each row of a view. Up to this point, we have accepted the formatting options provided by Views, whether to display a field label, which formats or displays the mode to use, or to turn the field into a link to the full content.

However, fields have a very flexible rewrite capability. Opening the REWRITE RESULTS fieldset in the field options shows what looks like six simple checkboxes. However, four of the six open up additional options when selected. Within these ...

Get Mastering Drupal 8 Views now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.