Display
Settings

A simple module to arrange Views results in a grid defined by a layout (requires the Layout Discovery module). Think of this as an alternative to the Views Grid display. Instead of a fixed grid with a set number of rows and columns, this gives you results in any kind of arrangement you like, based on whatever layouts you have enabled.

Each row of the view will be rendered into a region in the layout. When all the regions in the layout have been filled, a new instance of the layout will be created and populated. That process will be repeated until all the rows of the view have been rendered.

To use this module

  • Create a view of anything.
  • Select the 'Views Layout Grid' style.
  • On the style settings, choose the name of the layout to use.
  • Check the names of the regions you want to populate in the layout. You can omit regions if you don't want to populate all of them.
  • If you omit regions, you can choose to skip (not render) them, insert text into those regions, or implement a callback for more complex results.
  • Save the settings and view the result.

Some ways to use this module

  • Create a paged view that has the same number of results per page as the layout has regions, get one instance of the layout on each page.
  • Create a fancy layout with two regions on the first row, three on the second, one on the third, etc. to display the results in a complex pattern.
  • Omit some regions and insert other things into them for different effects (see api.views_layout.php for examples).

Comparison to similar modules

Layout Plugin Views

Layout Plugin Views is a row plugin, this one is a style plugin. Layout Plugin Views allows you to put the fields in a row into a layout, so you could put the title in the top region, the description in the left region, and the image in the right region.

Views Layout (this project) allows you to put the styled row results into different regions of a layout. So you could display row 1 in the top region, row 2 in the left region, and row 3 in the right region of a layout.

For maximum flexibility and confusion, you could use these together, using Layout Plugin Views to configure each row so its fields display in a layout and Views Layout to insert each of those layout-enabled rows into specific regions of yet another layout.

Supporting organizations: 

Project information

Releases