Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views Row Insert

Security covered Under active development 1,051 sites

Part of the Views ecosystem · 280 projects

This module adds a new display style to Views that allows you to insert custom content, such as HTML or blocks, after a specified number of rows in your view. This is useful for things like placing ads or other informational content between view items.

Description

This module provides a view style plugin, which is capable to insert custom row with html markup or blocks content into a view row results after every nth row.

The inserted row can contain a standard Drupal block created by modules like views, etc., or user's content block with custom html content. The row can use the custom class names along with the default row classes like views-row-1 and standard striping (odd/even), first/last row classes or it can go without them.

This module can be used for placing Google Adsense or any other code snippets/content into your views items output.

Installation

To install this module, do the following:

1. Extract the tar ball that you downloaded from Drupal.org.

2. Upload the entire directory and all its contents to your modules directory.

Configuration

To enable and configure this module do the following:

1. Go to Admin -> Modules, and enable Views Rows Insert.

2. Create a view or open an existing view display settings page and click on style plugin name next to "Format:" label at the "FORMAT" section. Choose "Insert Rows" style plugin in the list and click "Apply".

3. Choose the Row type by selecting "Block" or "Custom content" radio button. Depending on your choice, select a block name from the list or fill the "Custom content" textarea field. Be careful, this field does not filters out your input.

4. Select a number of rows to skip at "Insert after every Nth row" and also you can check some other settings like "Start with inserted row", "Insert row at the bottom" or "Limit the amount of inserted rows".

5. Enter name of the row class if any and configure other class related settings.

Requirements

Depends on Views module which is included into Drupal 8 core.

Customization

To override the default output html markup, you may edit the template file views-row-insert.html.twig located inside module's templates folder.

Drupal 8–11

Ask your assistant about Views Row Insert

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
8.x-2.2 Stable 8–11 Apr 22, 2025
8.x-2.1 Stable 8–10 Apr 24, 2023
8.x-2.x-dev Dev 8–11 Apr 24, 2023