Skip to main content

2 or 3 approaches to build a homepage or landing page through Drupal

Please include any limitations & considerations of each approach

Building a homepage a few options to consider and should against a business case:

 

1. Article

An article – create a new node (assuming a least one content type exists), then using Basic Site Settings (admin > config > system), scroll down to Front Page and enter the node.nid value or alias.

  • Pros:
    • Fast to apply
  • Cons:
    • Limited to only having one node appearing on the home page

 

2. Views

Create a view that references a collection of nodes using one or more content types.  This approach can also utilise Solr, if the dev has set up Solr on the server.

  • Pros:
    • Relatively easy to create;
    • Have more than one node appearing;
    • Filters can be applied in the set-up of the view, or if you really want they can also be exposed at the front-end;
    • More features and functionality can be applied
  • Cons:
    • Front-end work will be required to manage the layout unless you have a flexible and well-prepared theme

 

3. Custom module

Want something completely different on the home page.  Custom away.

  • Pros:
    • Huge flexibility in what you want to create
  • Cons:
    • Time-consuming;
    • As code updates are applied to the core, the risk increases in having to maintain your code.  Due to an update where you have deprecated functions.
       

Related articles

Andrew Fletcher04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...