Andrew Fletcher published: 3 August 2022 2 minutes read
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 Fletcher
•
22 Apr 2024
Streamlined Drupal 10 Deployment: Best Practices for Stability and Security
Have you ever walked into a situation and marveled at how a site is still operational? Deployments that are riddled with fail-safes piled atop a shaky foundation. The real challenge lies in gradually persuading the team to embrace change to build a stable, robust deployment process aligned with...
Andrew Fletcher
•
21 Apr 2024
This command will help you spot any unusually large directories
The red flag was when I saw the server disk space is showing a site is taking up 57992.5 MB, where locally the site size is showing 957MB. There is something serious happening here and I need to establish the problem quickly. When dealing with a significant discrepancy in site size...
Andrew Fletcher
•
19 Apr 2024
Extending a Contrib Module's Configuration in Drupal 10: A Case Study with Sitewide Alert
Extending the functionality of a contrib module in Drupal can enhance its usefulness without altering the original codebase. This article provides a step-by-step guide on how to add custom configuration options to an existing contrib module, using the sitewide_alert module as an example. We will...