kinulab/sonata-gentellela-theme-bundle
Kinulab Sonata Gentellela Theme Bundle provides a Gentellela-based admin theme for Symfony's Sonata Admin. It replaces the default SonataAdminBundle look with a responsive, modern dashboard UI, helping you quickly style admin panels and navigation without custom frontend work.
Know what you're adopting first. This is a Symfony 2.8/3.x-era bundle that skins sonata-project/admin-bundle (~3.x) with the Gentelella admin template. Last tagged release is September 2016, so treat it as a starting point to fork, not a maintained dependency.
Minimal install:
composer require kinulab/sonata-gentellela-theme-bundle
// app/AppKernel.php — register AFTER SonataAdminBundle and SonataCoreBundle
$bundles = [
// ...
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
new Kinulab\SonataGentellelaThemeBundle\KinulabSonataGentellelaThemeBundle(),
];
bin/console assets:install --symlink web
bin/console cache:clear
The bundle most likely wires itself in through bundle inheritance (getParent() returning SonataAdminBundle), which is why registration order and asset publishing are the only two steps. Confirm the exact FQCN and any required sonata_admin config keys by reading vendor/kinulab/sonata-gentellela-theme-bundle/ — there is no documentation to rely on.
Where to look first:
Resources/views/ — this is the whole product. Expect overrides of standard_layout.html.twig, layout.html.twig, dashboard.html.twig, and the CRUD templates.getParent() in the bundle class — tells you whether it uses inheritance or Twig namespace overrides.Resources/public/ — the Gentelella CSS/JS/vendor assets and the hardcoded bundles/... paths they reference.First use case: you have a working Sonata 3.x admin and want a different chrome without rewriting Admin classes. Register the bundle, publish assets, load the dashboard. If the sidebar and panels render, you're done; if the page renders unstyled, it's an asset-path problem (see Gotchas).
Layering your own customizations. Don't edit vendor/. Create a small app bundle that extends the theme bundle and override only the templates you need:
class AppAdminThemeBundle extends Bundle
{
public function getParent() { return 'KinulabSonataGentellelaThemeBundle'; }
}
Register it after the theme bundle and put your overrides in its Resources/views/. Alternatively, for one-off changes, app/Resources/KinulabSonataGentellelaThemeBundle/views/....
Per-admin templates. Sonata's standard extension points still apply, so use them rather than global overrides:
// In your AbstractAdmin subclass
public function getTemplate($name)
{
if ($name === 'edit') {
return 'AppAdminThemeBundle:CRUD:edit.html.twig';
}
return parent::getTemplate($name);
}
Dashboard widgets. Gentelella lays out panels with x_panel / x_title / x_content and a Bootstrap 3 grid. Any custom sonata_admin_dashboard block you add must emit that markup, or it will float oddly next to the built-in panels. Copy an existing block template as the pattern.
Form rendering. If the bundle ships a form theme, register it globally instead of per-template:
twig:
form_themes:
- 'SonataAdminBundle:Form:form_admin_fields.html.twig'
Companion bundles need their own coverage. If you use SonataDoctrineORMAdminBundle, SonataTranslationBundle, or SonataUserBundle, their templates are not themed by this bundle. Plan to override their list/edit templates too, otherwise you get a Gentelella shell with AdminLTE-era fragments inside.
Menu and sidebar. The sidebar is a KnpMenu render driven by sonata_admin config plus the menu builder. To add icons, use the menu attributes Sonata understands and verify they map onto the Font Awesome classes the theme ships.
It will not install on modern Symfony. Bundle inheritance (getParent()) was deprecated in Symfony 4.0 and removed in 5.0, and Sonata 4.x moved to namespaced Twig paths (@SonataAdmin/...). Pin the stack explicitly:
"sonata-project/admin-bundle": "^3.0",
"symfony/symfony": "~3.4"
Expect PHP 5.6/7.0-era constraints — no PHP 8.
Asset paths break silently. The theme's standard_layout.html.twig almost certainly references bundles/kinulabsonatagentellelatheme/.... If assets:install went to a different target, or your deploy uses symlinks that don't survive the release artifact, you get an unstyled admin with a 200 response for the HTML. Check web/bundles/ and the network tab.
Assetic still matters. On a 2016 Sonata setup you may be compiling through Assetic. If so, add the bundle to assetic.bundles in config.yml and run bin/console assetic:dump --env=prod — cache:clear alone won't refresh the dumped files.
JS collisions. Gentelella pulls its own jQuery/Bootstrap 3 plugin set (select2, datepickers, iCheck). Sonata's sonata.admin.js and its collection/widget scripts were written against AdminLTE. Rich widgets — sonata_type_collection, sonata_type_model_autocomplete, date pickers — are where breakage shows up first. Open one admin with a collection field and one with a date field before declaring victory.
Find which template actually rendered. Use bin/console debug:twig (Symfony 3.2+) to inspect the resolver chain, and turn on twig.strict_variables in dev to surface missing blocks the theme expects but your override doesn't define.
Extension points to prefer: sonata_admin.templates config for global layout/dashboard/list/edit, getTemplate() for per-admin granularity, and {% block sonata_admin_content %}-style block overrides inside a child bundle. Reach for those before editing the theme's Twig directly.
Long-term plan. With 7 stars, no dependents, and no commits since 2016, budget for a fork in vendor-adjacent src/ and treat the theme as your code. If you're starting fresh, the realistic alternatives are Sonata 4.x with Bootstrap 4 templates, or EasyAdmin — this bundle is a migration shortcut for an existing 3.x app, not a foundation for a new one.
How can I help you explore Laravel packages today?