hi,
i’m trying fo install multisite, it works very well, i need only plugins in the main website, but my issue is to have different css for each subsite
i try Inheritance but with no success. Thanks for any tips
my folder structure :
root
setup.php
>user
>themes
>MainTheme
>template
>css
>blueprints
> etc...
>sites
>themes
>subsite A
>config
>pages
>themes
>MainTheme
>css
- custom.css
>subsite B
My setup.php
— php
use Grav\Common\Filesystem\Folder;
// Get relative path from Grav root.
$path = isset($_SERVER[‘PATH_INFO’])
? $_SERVER[‘PATH_INFO’]
: Folder::getRelativePath($_SERVER[‘REQUEST_URI’], ROOT_DIR);
// Extract name of subsite from path
$name = Folder::shift($path);
$folder = “sites/{$name}”;
$prefix = “/{$name}”;
if (!$name || !is_dir(ROOT_DIR . “user/{$folder}”)) {
return [];
}
// Prefix all pages with the name of the subsite
$container[‘pages’]->base($prefix);
$themes = [“user/themes”];
if (is_dir(DIR . “/user/sites/{$folder}/themes”)) {
array_unshift($themes, “user/sites/{$folder}/themes”);
}