Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

This module allows to create micro sites from a Drupal 8 site.

Micro site is usable right now for production but architecture can be changed during alpha phase without upgrade path.

INTRODUCTION

This module provide a site entity which can be used as a new micro site. Alone, you can only publish a micro site as a one page site. But Micro site is extended by :

The main idea is to provide the ability to publish many multiple sites from one Drupal instance, as Typo3 can do for example.

You can set multiples site types (one page, generic, event, etc.) and configure them differently. After configuring micro site and its related module, the main work to do is some site building (adding Fields to site entity to provide a header or/and a footer, place block with a correct visibiity, etc.) and some twig theming with your theme.

Node can be shared between site entities, and between the master host and sites (in both directions).

Users can be added to each sites entities, with different permissions per site.

REQUIREMENTS

The Drupal project on which Micro Site is enabled must be accessible from a fully qualified domain name (or a local domain for development purpose). Otherwise, if using 127.0.0.1 or localhost, Micro Site will not work.

INSTALLATION

Install as you would normally install a contributed Drupal module. See: https://www.drupal.org/documentation/install/modules-themes/modules-8 for further information.

CONFIGURATION

Once Micro Site is enabled you should configure immediately settings for Micro Site module. In particular, you must immediately configure the three parameters base_url, base_scheme, public_url. The absence of these parameters can lead to a 404 page on the master instance's home page.

You can override theses settings in the settings.php file. For example :

$config['micro_site.settings']['base_url'] = 'microsite.local';
$config['micro_site.settings']['base_scheme'] = 'http';
$config['micro_site.settings']['public_url'] = 'microsite.local';

Each micro site create automatically (when created) a file in the directory DRUPAL_ROOT/sites/default/hosts with the corresponding trusted_host_patterns setting.

You have to add to the settings.php file the following lines in order to include these files.

$dir_hosts = $app_root . '/' . $site_path . '/hosts';
if (file_exists($dir_hosts) && is_dir($dir_hosts)) {
  foreach (glob($dir_hosts . '/*.host.php') as $filename) {
    include $filename;
  }
}

DOCUMENTATION

There is still a lot of work to be done about the documentation. But you can find an introduction to the module, and a brief tutorial here Small sites, large sites, micro sites with Drupal 8. And you can have an example to build a footer for a micro site (Provide a footer to a micro site with Drupal 8). Of course there is plenty others ways to build such features (block, fields).

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Feb 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
8.x-1.0-alpha11 Pre-release Mar 5, 2024
8.x-1.0-alpha10 Pre-release Feb 16, 2024
8.x-1.0-alpha9 Pre-release Feb 10, 2024