Selecting which view mode a view will use

    When you create a View, you can choose to render each result as 'content' and use a View mode for the display of each result. For example, you can choose to render each result using the Teaser View mode. View modes use Content templates for their layout.

    There are two places where you can select which View mode you View will use. These are:

    Selecting your view mode within the view settings

    To select which View mode your view will use within the View settings:

    1. Navigate to Structure > Views > Select your view
    2. Within the Format section, next to Show, click on the current View mode (This may say Teaser)

      Select-view-mode-within-view-settings.png
       
    3. In the modal, click on the View mode drop-down and select your view mode.

      Select-view-mode-within-view-settings-modal.png
       

    The View mode selected within View settings will only be used if the View item element within your View template is set to show Drupal default.

    Selecting your view mode within the view settings

    You can select which View mode your view will use, directly within your View template. Selecting it here will override any setting applied within the Drupal view settings. The advantage of selecting your View mode within your View template is that it keeps the control of your view layout within the View template, but more importantly, DX8 allows you to use multiple View modes within the same View template. This provides more layout control and flexibility.

    To select your View mode from within your View template:

    1. Navigate to DX8 > View templates > Select your view template
    2. Double click on a View item element to edit its settings
    3. In the Entity type drop-down, select the entity type you want to display. Select Content if the view is displaying content
    4. In the Bundle drop-down, select the entity bundle you are displaying. For example, Article
    5. In the View mode drop-down, select the View mode you want to use to display your content.

      Select-view-mode-within-view-template.png

    Within the View item element settings you are able to select a different view mode for each Entity type bundle. This is useful if your View is displaying content from different content types, as you are able to select which View mode to use for each specific Content type. To Select a different View mode for each Entity bundle, Click on the Add entity type view mode link within the View mode settings area.

    Cohesion DX8 Help center

    Launch our Help center to raise a support ticket or search our knowledge base of common questions and answers.

    DX8 knowledge base icon

    Knowledge base

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    Log in to the Help center to raise an issue. Available Monday - Friday, 09:00 - 17:00 GMT.

    Raise ticket