Getting started with a Drupal view

By cyberpuffin, 22 May, 2023

Views

In the MVC Architecture, the View is used to display the data from the model + controller for client viewing.  Drupal is not a traditional MVC architecture, but I do wonder if this term is a carry-over.

Show dev log posts on a page

Seems simple enough.  Show the list of posts on a single navigation page.  From there the dev log posts should be clickable to lead to the full article.

From Structure (/admin/structure) go to the Views page (/admin/structure/views) and click + Add view to start the new view wizard.

  • View Basic Information:
    • View name: Dev Log
    • Description: Checked
      • Dev log posts from all tags
  • View Settings:
    • Show: Content
    • of type: Dev Log
    • sorted by: Newest first
  • Page settings
    • Create a page: Checked
    • Page title: Dev Log
    • Path: /dev_log
    • Page display settings:
      • Diplay format: Unformatted list
      • of: teasers
    • Items to display: 10
    • Use a pager: Checked

Save and edit to save the new view and go to the edit page, which shows a preview of the new view at the bottom.  The view will also be available at the specified path.

Further tuning

The new basic view has one Display, the Page created in the wizard, along with the remaining settings that were entered in.  Other fields are available for adding more advanced interactions and data.

From this page (/admin/structure/views/view/<view_name>) more advanced actions can be added and previewed.  Further testing to come.

Technology

Comments