agence-raid/sulu-site-configuration-bundle
Adds a Configuration tab in the Sulu webspace view to manage per-webspace, per-locale site settings (phone, email, social links, logo, etc.) stored as a flexible JSON entity.
composer require agence-raid/sulu-site-configuration-bundle
In config/bundles.php:
AgenceRaid\SuluSiteConfigurationBundle\SuluSiteConfigurationBundle::class => ['all' => true],
In config/routes/admin.yaml:
agence_raid_sulu_site_configuration_admin:
resource: '@SuluSiteConfigurationBundle/config/routes/admin.yaml'
bin/adminconsole doctrine:migrations:diff
bin/adminconsole doctrine:migrations:migrate
Create config/forms/webspace_configs/default.xml with the fields you need:
<?xml version="1.0" ?>
<form xmlns="http://schemas.sulu.io/template/template"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/form-1.0.xsd">
<key>site_configuration</key>
<properties>
<property name="logo" type="single_media_selection">
<meta>
<title lang="fr">Logo</title>
</meta>
</property>
<property name="website_email" type="text_line">
<meta>
<title lang="fr">Email</title>
</meta>
</property>
</properties>
</form>
To override the form for a specific webspace, create config/forms/webspace_configs/{webspace-key}.xml with key site_configuration_{webspace-key}.
Go to Settings → Roles in the Sulu admin and grant {webspace-key}.configuration permissions to the relevant roles.
{{ site_config('website_email') }}
{{ site_config('phone', '+33 0 00 00 00 00') }}
{% set logo = sulu_resolve_media(site_config('logo').id, app.request.locale) %}
<img src="{{ logo.url }}" alt="Logo" />
use AgenceRaid\SuluSiteConfigurationBundle\Service\SiteConfigurationService;
public function __construct(
private readonly SiteConfigurationService $configurationService,
) {}
$email = $this->configurationService->get('my-webspace', 'fr', 'website_email');
$all = $this->configurationService->getAll('my-webspace', 'fr');
How can I help you explore Laravel packages today?