- Home
- Manage the site
- Connect Drupal features
- Drupal Views
Show a Drupal view on your page
Put a list that updates itself into your layout: the latest news, upcoming events or a team directory. You add it once; the view picks the items, and new content appears without anyone editing the page. For one fixed piece, such as a form or a menu, use Drupal Blocks instead.
Before you start
- The Views module is enabled.
- A view with the list you want exists under
Structure > Views (
/admin/structure/views). A block display is the usual choice, because it has no page of its own.
Set up
- Click + where the list should go and open the Drupal Views tab of the element picker.
- Pick a tag under Filter by tag, or type the view name in Search.
- Click the view display. Its settings dialog opens.
- To show a different number of items on this page, set Override pager to Yes and enter the number.
- Click Save in the dialog, then Save on the toolbar.
What you see
The list appears with the filters, sorting and style the view defines. Each entry in the picker reads "View name (Display title)". The tab lists every display of every enabled view, page displays included.
To change the view itself, open the element's More menu and choose Edit View. The display opens in the Views editor in a new browser tab.
Settings
The dialog only shows the settings that fit the view you picked.
| Setting | What it does | Default |
|---|---|---|
| Show title | Shows the view's title as a heading; offered when the view has a title | off |
| Show exposed filters | Shows the view's filter form above the list; offered when the view has exposed filters | off |
| Override pager | Lets this page use its own number of items and offset | No |
| Items to display or Items per page | How many items to show; 0 shows all | the view's own value |
| Pager offset | How many items to skip at the start | the view's own value |
| Contextual filter | Values for the view's contextual filters, separated by "/", for example 40/12/10 | empty |
| Field settings | On the Toggle fields tab: untick fields to hide them on this page | all fields shown |
To limit which views your editors can pick, use the Views list of a user profile.
If you don't see the list
- A new view is not in the Drupal Views tab.
The view is disabled, or your user profile does
not offer it: new displays are not ticked
automatically. Enable the view under Structure
Views, then tick it under Views in the profile at
/admin/dxpr_studio/dxpr_builder/profile. - The editor shows "Turn on Ajax on this view to use exposed filters." Show exposed filters is on, but the view does not use Ajax. Edit the view and set Use AJAX to Yes under Advanced.
- The element stays empty. The view returned no results or the visitor may not see it. Check the view's filters and access settings with Edit View.
- Exposed filters do not appear for visitors. Show exposed filters is off for this element. Open its settings and tick it.
What's next?
Drupal blocks to place reusable content to continue exploring DXPR Builder.