PHPackages                             alengo/sulu-category-extra-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. alengo/sulu-category-extra-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

alengo/sulu-category-extra-bundle
=================================

Additional Data tab for Sulu CMS Categories — generic JSON field with configurable forms

3.0.1(1mo ago)05MITPHPPHP ^8.2

Since May 4Pushed 1mo agoCompare

[ Source](https://github.com/alengodev/SuluCategoryExtraBundle)[ Packagist](https://packagist.org/packages/alengo/sulu-category-extra-bundle)[ Docs](https://github.com/alengodev/SuluCategoryExtraBundle)[ RSS](/packages/alengo-sulu-category-extra-bundle/feed)WikiDiscussions 3.x Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

SuluCategoryExtraBundle
=======================

[](#sulucategoryextrabundle)

Adds an **Additional Data** tab to the Sulu CMS category admin form. Stores arbitrary extra fields as a JSON column on the existing `ca_categories` table — no additional tables required.

Features
--------

[](#features)

- Adds a configurable tab to the Sulu category edit form
- Stores extra fields as a JSON blob on the `Category` entity
- Form definition is fully controlled by the project via a standard Sulu form XML file
- Tab title, form key, and resource key are configurable
- Follows the same patterns as `alengo/sulu-contact-account-extra-bundle`

Requirements
------------

[](#requirements)

- PHP 8.2+
- Sulu CMS ~3.0

Installation
------------

[](#installation)

### 1. Add the bundle

[](#1-add-the-bundle)

**From Packagist**:

```
composer require alengo/sulu-category-extra-bundle
```

### 2. Register the bundle

[](#2-register-the-bundle)

Add to `config/bundles.php`:

```
Alengo\SuluCategoryExtraBundle\AlengoSuluCategoryExtraBundle::class => ['all' => true],
```

### 3. Register the routes

[](#3-register-the-routes)

Add to `config/routes/sulu_admin.yaml`:

```
CategoryExtraBundle:
    resource: "@AlengoSuluCategoryExtraBundle/Resources/config/routing_admin_api.yaml"
    prefix: /admin/api
```

### 4. Create the form definition

[](#4-create-the-form-definition)

Create `config/forms/category_additional_data.xml` in your project:

```

    category_additional_data

                Theme
                Theme

                            Default
                            Standard

                            Blue
                            Blau

```

Any standard Sulu field type (`text_line`, `single_select`, `text_editor`, `media_selection`, etc.) can be used. All fields are stored as top-level keys in the JSON blob.

### 5. Run the database migration

[](#5-run-the-database-migration)

```
php bin/console doctrine:schema:update --force
```

This adds an `additionalData` JSON column to the existing `ca_categories` table.

Configuration
-------------

[](#configuration)

The bundle works out of the box with its defaults. To override any setting, add to `config/packages/alengo_sulu_category_extra.yaml`:

```
alengo_sulu_category_extra:
    entity_class: Alengo\SuluCategoryExtraBundle\Entity\Category  # default
    form_key: category_additional_data                             # default
    resource_key: category_additional_data                         # default
    tab_title: sulu_admin.app.additional_data                      # default
```

OptionDescription`entity_class`The extended Category entity class to use`form_key`Must match the `` in your form XML file`resource_key`Resource key used by the Sulu admin frontend`tab_title`Translation key or literal string shown as the tab labelReading additional data in Twig
-------------------------------

[](#reading-additional-data-in-twig)

The `additionalData` field is available on every `Category` entity. To read it in a Twig template, retrieve the category via the Sulu category manager or repository and access the extra fields:

```
{# category is an instance of the extended Category entity #}
{% set theme = category.additionalData.theme ?? '' %}
```

When categories are passed through Sulu's standard API (e.g. navigation, content types), you may need to load the entity directly to access `additionalData`:

```
use Alengo\SuluCategoryExtraBundle\Entity\Category;
use Sulu\Bundle\CategoryBundle\Entity\CategoryInterface;

$category = $entityManager->getRepository(CategoryInterface::class)->find($id);
if ($category instanceof Category) {
    $theme = $category->getAdditionalData()['theme'] ?? '';
}
```

API Endpoints
-------------

[](#api-endpoints)

The bundle exposes two admin API endpoints (protected by Sulu's category security context):

MethodPathDescription`GET``/admin/api/category-additional-data/{id}`Load additional data for a category`PUT``/admin/api/category-additional-data/{id}`Save additional data for a categoryBoth endpoints return a JSON object with the category `id` plus all stored additional fields as top-level keys.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance93

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

36d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a3bea97975bdeddcfa5b76c222740e703e4ff5f9bbf5f6d5d75e8827e0a48ac?d=identicon)[alengodev](/maintainers/alengodev)

---

Top Contributors

[![iDobrounig](https://avatars.githubusercontent.com/u/4222276?v=4)](https://github.com/iDobrounig "iDobrounig (3 commits)")

---

Tags

cmsadminextendcategorysulu

### Embed Badge

![Health badge](/badges/alengo-sulu-category-extra-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/alengo-sulu-category-extra-bundle/health.svg)](https://phpackages.com/packages/alengo-sulu-category-extra-bundle)
```

###  Alternatives

[sulu/skeleton

Project template for starting your new project based on the Sulu content management system

29734.8k](/packages/sulu-skeleton)[arbory/arbory

Administration interface for Laravel

4853.9k3](/packages/arbory-arbory)[bpocallaghan/titan

Core framework for laravel projects (Laravel Admin Starter).

5811.2k1](/packages/bpocallaghan-titan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
