Starting a website

Managing a website

DIY website plans from $65 per month.

Making websites work

Contact us or phone 1300 400 934 to get started.

PHP

Matt's picture

Drupal views can be used to generate a block of related node content

Over the last couple of weeks I have found myself repeatedly coming back to using Drupal views to generate blocks of related node content.

In a nutshell Drupal views can be configured to list things in various display modes. One of the configuration options of views is arguments. In Drupal Views the argument is like the WHERE clause in an SQL statement. Views can take their arguments from the URL or from PHP code. Using the Drupal Views PHP code option it is possible to apply logic to how you get information about the currently displayed node.