Add a filter to a view

  1. Navigate to the edit screen for a view (for example, admin/structure/views/view/MYVIEWNAME/edit).
  2. In the Filters section, click Add.
  3. In the For field, select one of the following options:
    • All Displays The filter will be added to all of the displays in the current view.
    • This Page (override) The filter will only be added to the current display.

Rewrite the output of a view field

You can configure a field in a view to display information that is different from the actual data in the field. By using tokens, you can enhance the field with dynamic content from the database.

  1. Navigate to the edit screen for a view (for example, admin/structure/views/view/MYVIEWNAME/edit).
  2. In the Fields section, click a field. The Configure Field dialog box displays.
  3. Click Rewrite Results.
  4. Enable any of the following options:
    • Rewrite the output of this field You can replace the field with custom text. When this option is enabled, a list of tokens is displayed which you can use to dynamically add data to the custom text.
    • Output this field as a link You must enter the link path. You can also configure various options for how the link will be displayed.
    • Trim this field to a maximum length Enter the maximum number of characters that will be displayed.
    • Strip HTML tags When this option is enabled, all HTML tags will be stripped. You can also specify certain tags to keep.
    • Remove whitespace If this option is enabled, all whitespace at the beginning and the end of the output will be removed.

Customize the output style of a view field

You can customize the HTML and CSS for a view. You can also enable or disable the default CSS classes.

Add a field to a view

  1. Navigate to the edit screen for your view (for example, admin/structure/views/view/MYVIEWNAME/edit).
  2. In the Fields section, click Add. The Add Fields dialog box is displayed.
  3. In the For field, select one of the following options:
    • All Displays The field will be added to all of the displays in the current view.
    • This Page Override The field will only be added to the current display.

Create a simple block view

Views allows you to create listings of data on your site as blocks which can be placed in regions on your site.

d8preview-views-block.png

  1. Navigate to admin/structure/views.
  2. Click Add New View. This brings you to a Views creation wizard to ensure you have the correct basic settings for your view.
  3. In the View Name field enter a name for the view.
  4. Click Description and enter a description.
  5. Under View settings > Show, select one of the following options:
    d8-views-settings-terms.png
    • Comments Sort options can be specified.
    • Log entries Sort options can be specified.
    • Files Sort options can be specified.
    • Content Content type, tags and sorting options can be specified.
    • Content Revisions Sort options can be specified.
    • Taxonomy Terms Tag type and sorting options can be specified.
    • Users Sort options can be specified.

Create a simple page view

  1. Navigate to admin/structure/views.
  2. Click Add New View.
  3. In the View Name field enter a name for the view.
  4. Click Description and enter a description.
  5. In the Show field, select one of the following options:
    • Comments Sort options can be specified.
    • Files Sort options can be specified.
    • Content Content type, tags and sorting options can be specified.
    • Content Revisions Sort options can be specified.
    • Taxonomy Terms Tag type and sorting options can be specified.
    • Users Sort options can be specified.
  6. Enable the Create a Page option. A set of options and fields for page views is displayed.
  7. Enter information in any of the following optional fields:
    • Page Title
    • Path
  8. In the Display Format section, choose one of the following options:
    • Grid
    • HTML List
    • Table
    • Unformatted List

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x