Prehome
This module adds a customizable splash screen entity to your Drupal site. You can configure the content and appearance of these splash screens using fields and display settings, and control their visibility on specific pages.
This module displays a splash-screen (prehome) on the desired pages.
It adds a new entity 'prehome' that you can customize as a standard entity (fields, form & display) to fit your requirements.
It also comes with related permissions.
Usage
Install the Prehome module as you would normally install a contributed Drupal module (see https://www.drupal.org/node/1897420 for more information).
- Add prehome_display_count to the allowed cookies, in your GDPR module (if any).
- Set prehome fields, form & display settings to fit your requirements in Structure > Prehome (admin/structure/prehome/settings).
Out of the box it contains a single WYSIWYG field, but you can easily add some more to fit your requirements (image, plain text, link, etc.). - Add at least one prehome in Content > Prehome (admin/structure/prehome).
- Configure prehome display settings in Configuration > Prehome (admin/config/prehome/settings).
Templating
You can use usual templating process to alter render of the prehome, by overriding the default template with :
* prehome--[entity_id]--[view_mode].html.twig
* prehome--[view_mode].html.twig
x prehome.html.twig
And by implementing hook_preprocess_prehome() if needed.
Drupal 10
As 1.x version is not compliant with D10 (only D8/D9), use 2.x version instead (D9/D10).
Note that 1.x won't be maintained anymore.
Suggestions
Feel free to suggest improvements !