Quickly create content with Views Add Button and Admin Dialogs

Views lets you create pages that list content, but doesn't provide a way to add new items to the list.

Here's how to add a button to the top to create any content entity.

  1. Install the Views Add Button and Admin Dialogs modules.
  2. Set up a view, add an Entity add button to the header.
  3. For Node content, select the type, and pick ViewAddButtonNode for the rendering and access plugin.
  4. Customize additional settings if needed, like the button text or class.

Now your view should have a button that links to the entity add form.

To make it open in a dialog, configure Admin Dialogs.

  1. Create a new dialog group, Views add button.
  2. Create a dialog in the group, Views add button.
  3. Choose CSS Selector for the type, modal for dialog type, and the width.
  4. Use .views-add-button as the CSS selector.
  5. Add the .views-add-button to your views button configuration.
Image
Drupal Admin Dialogs configuration for Views Add Button

Now your view button should open in a modal.