Muut
1
Hey there,
is it possible to create a stream with the “accounts” folder?
With my actual setup.php it won’t work:
<?php
/**
* Multisite setup for subsites accessible via sub-domains.
*
* DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING!
*/
use Grav\Common\Utils;
// Get subsite name from sub-domain
$environment = isset($_SERVER['HTTP_HOST'])
? $_SERVER['HTTP_HOST']
: (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost');
// Remove port from HTTP_HOST generated $environment
$environment = strtolower(Utils::substrToString($environment, ':'));
$folder = "sites/{$environment}";
if ($environment === 'localhost' || !is_dir(ROOT_DIR . "user/{$folder}")) {
return [];
}
return [
'environment' => $environment,
'streams' => [
'schemes' => [
'themes' => [
'type' => 'ReadOnlyStream',
'prefixes' => [
'' => ["user/themes"],
]
],
'accounts' => [
'type' => 'Stream',
'prefixes' => [
'' => ["user/accounts"],
]
],
'plugins' => [
'type' => 'Stream',
'prefixes' => [
'' => ["user/plugins"],
]
],
'accounts' => [
'type' => 'Stream',
'prefixes' => [
'' => ["user/accounts"],
]
],
'user' => [
'type' => 'ReadOnlyStream',
'prefixes' => [
'' => ["user/{$folder}"],
]
],
]
]
];
Muut
2
Multisite stuff is pretty advanced, how about creating an issue here: https://github.com/getgrav/grav/issues
Also please past your YAML config in code blocks back-ticks “```”