PHPackages                             symkit/page-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. symkit/page-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

symkit/page-bundle
==================

Page Bundle

v0.0.1(4mo ago)00MITPHPPHP &gt;=8.2CI passing

Since Feb 23Pushed 4mo agoCompare

[ Source](https://github.com/SymKit/page-bundle)[ Packagist](https://packagist.org/packages/symkit/page-bundle)[ RSS](/packages/symkit-page-bundle/feed)WikiDiscussions main Synced today

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

[![CI](https://github.com/symkit/page-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/symkit/page-bundle/actions)[![Latest Version](https://camo.githubusercontent.com/9d064c8daff70d0c9bac27adfe70d87d88d4addcb45d9de798133d71cc8fccc3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796d6b69742f706167652d62756e646c652e737667)](https://packagist.org/packages/symkit/page-bundle)[![PHPStan Level 9](https://camo.githubusercontent.com/1bc07920f0d36e55c17e1d38b1caa132cc605f51a82b388c962870b9a747b898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d627269676874677265656e2e737667)](https://phpstan.org/)

Symkit Page Bundle
==================

[](#symkit-page-bundle)

The **Symkit Page Bundle** provides a robust and flexible system for managing dynamic content pages and categories within your Symfony application. It integrates with the SymKit ecosystem: `symkit/menu-bundle`, `symkit/metadata-bundle`, `symkit/form-bundle`, `symkit/crud-bundle`, `symkit/faq-bundle`, `symkit/search-bundle`, and `symkit/sitemap-bundle`. Optional: `symkit/routing-bundle` for database-driven routes and `symkit/media-bundle` for OG images.

Features
--------

[](#features)

- **Dynamic Page Management**: Create, edit, and publish pages with rich content.
- **Categorization**: Organize pages into hierarchical categories.
- **SEO Optimized**: Built-in support for meta titles, descriptions, and Open Graph images.
- **Sitemap Integration**: Automatically generates sitemap entries for published pages.
- **Menu Integration**: Link pages to specific menus and highlight active menu items automatically.
- **Flexible Routing**: Custom slug management with conflict resolution.
- **Admin Interface**: Ready-to-use CRUD controllers for Pages and Categories.

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

[](#installation)

### 1. Require the Bundle

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

Add the bundle to your project's `composer.json` (assuming it's a local package):

```
"require": {
    "symkit/page-bundle": "@dev"
}
```

Then run:

```
composer update symkit/page-bundle
```

### 2. Register the Bundle

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

If not automatically registered by Flex, add it to `config/bundles.php`:

```
return [
    // ...
    Symkit\PageBundle\SymkitPageBundle::class => ['all' => true],
];
```

### 3. Import Routes

[](#3-import-routes)

Import the bundle routes in your application (e.g. `config/routes.yaml`):

```
symkit_page:
    resource: '@SymkitPageBundle/config/routes.yaml'
    prefix: /
```

You can change the prefix or omit it if you use a different structure.

### 4. Database Migration

[](#4-database-migration)

The bundle includes `Page` and `Category` entities. Update your database schema:

```
php bin/console make-migration
php bin/console doctrine:migrations:migrate
```

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

[](#configuration)

The bundle is fully configurable. All features can be enabled or disabled, and entity/repository classes can be overridden.

### Reference

[](#reference)

```
# config/packages/symkit_page.yaml
symkit_page:
    base_layout: "base.html.twig"

    # Override entity and repository classes (e.g. for custom fields or behavior)
    entity:
        page_class: Symkit\PageBundle\Entity\Page
        page_repository_class: Symkit\PageBundle\Repository\PageRepository
        category_class: Symkit\PageBundle\Entity\Category
        category_repository_class: Symkit\PageBundle\Repository\CategoryRepository

    # Enable/disable features
    front:
        enabled: true
        route_path: "/{slug}"
        route_name: page_show
        controller: Symkit\PageBundle\Controller\PageController
    admin:
        enabled: true
    sitemap:
        enabled: true
    search:
        enabled: true
    metadata:
        enabled: true

    layouts:
        simple:
            label: "Layout Simple"
            path: "@SymkitPage/layout/simple.html.twig"
        # ...
```

- **entity**: Replace with your own entity/repository classes when extending the bundle's models.
- **front / admin / sitemap / search / metadata**: Set `enabled: false` to disable the corresponding controllers, sitemap loader, search provider, or metadata (breadcrumbs, SEO populator).

### Layouts

[](#layouts)

Pages can use different layouts. You define them in your application configuration:

```
symkit_page:
    base_layout: "website/layout/base.html.twig"
    layouts:
        default:
            label: "Layout Standard"
            path: "@SymkitPage/layout/content.html.twig"
        simple:
            label: "Layout Simple"
            path: "website/layout/simple.html.twig"
        with_toc:
            label: "Layout with Table of Contents"
            path: "website/layout/with_toc.html.twig"
```

#### Layout Inheritance (Bridge Pattern)

[](#layout-inheritance-bridge-pattern)

The bundle uses a "Bridge" architecture to remain generic while injecting bundle-specific logic (like TOC automation):

1. **`PageController`** renders `@SymkitPage/layout/bridge.html.twig`.
2. **`bridge.html.twig`** extends the **`layout`** variable (chosen in admin).
3. Your project **Layouts** (simple, with\_toc, etc.) should extend the **`base_layout`** global variable.

This ensures that regardless of the layout chosen, the bundle can inject its Stimulus controllers and necessary attributes without hardcoding paths to your project templates.

### Translations

[](#translations)

All user-facing strings use the **SymkitPageBundle** translation domain. XLIFF files are shipped in the bundle's `translations/` directory for **en** and **fr**. Override or extend them in your app:

- Copy keys into your `translations/SymkitPageBundle.en.xlf` (and `.fr.xlf`) to customize.
- Or replace the bundle's translations by placing files in `translations/` with the same domain.

Constraint messages (e.g. `validation.unique_route`, `validation.slug_pattern`) use the same keys; ensure your validator translation domain includes them or override in `validators.*.xlf` if needed.

### Dependencies

[](#dependencies)

Suggested bundles (see `composer.json` suggest):

- `symkit/crud-bundle`: Admin CRUD interface.
- `symkit/menu-bundle`: Menu integration and active item highlight.
- `symkit/metadata-bundle`: SEO, JSON-LD and breadcrumbs.
- `symkit/form-bundle`: SlugType, FormSectionType and form theme.
- `symkit/faq-bundle`: FAQ blocks on pages.
- `symkit/search-bundle`: Global search (admin).
- `symkit/sitemap-bundle`: XML sitemap for pages.
- `symkit/routing-bundle`: Database-driven routes for pages (load routes with `type: database` in the host app).
- `symkit/media-bundle`: OG images and media picker (use the `|media_url` Twig filter in templates).

Usage
-----

[](#usage)

### Managing Pages

[](#managing-pages)

Access the admin interface (typically at `/admin/pages`) to manage pages.

**Fields:**

- **Title &amp; Slug**: define the page identity and URL.
- **Content**: Rich text content.
- **Status**: Draft or Published.
- **Category**: Group pages logically.
- **SEO**: Override meta title/description and set an OG Image.
- **Menu Integration**:
    - *Sidebar Left Menu*: Override the default sidebar for this specific page.
    - *Active Menu*: Specify which menu should be considered "active" when viewing this page.

### Managing Categories

[](#managing-categories)

Categories allow you to group pages and define default behaviors (admin at `/admin/categories`).

**Fields:**

- **Name &amp; Slug**: Identifier.
- **Default Sidebar Menu**: Set a default menu that will be displayed on the sidebar for all pages in this category (unless overridden by the page itself).

### Frontend Rendering

[](#frontend-rendering)

To render a page, use the `PageController`; the route `page_show` is provided by the bundle (path `/{slug}` by default). Import the bundle routes as shown in Installation.

You can customize the templates by overriding them in `templates/bundles/SymkitPageBundle/`.

**Default Template Structure:**

- `@SymkitPage/layout/bridge.html.twig`: Main entry point (Bridge) that extends the selected layout.

Architecture &amp; Services
---------------------------

[](#architecture--services)

- **MetadataPopulator**: Implements SymKit metadata-bundle populators: SEO (title, description, OG image) and JSON-LD FAQ schema when a page is viewed.
- **PageBreadcrumbBuilder**: Builds breadcrumbs from the page (Home, active menu path, current page) when the page is in request attributes.
- **PageSitemapLoader**: Feeds the sitemap generation process with published pages.
- **PageRepository**: Provides helper methods for fetching published pages.

Development
-----------

[](#development)

- **Tests**: `make test` runs unit tests by default. Run `vendor/bin/phpunit` (without group exclude) for the full suite including integration tests.
- **Code style**: `make cs-fix` (requires `friendsofphp/php-cs-fixer` in require-dev).
- **Static analysis**: `make phpstan` (requires `phpstan/phpstan` in require-dev).
- **Full pipeline**: `make quality` runs cs-check, phpstan, deptrac, lint, test and infection.

License
-------

[](#license)

Private / Proprietary.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance76

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/077eba6702dc23a795ee2262dff92505e3c8ead08f7cb205be80d8aae0a6b8e5?d=identicon)[sdieunidou](/maintainers/sdieunidou)

---

Top Contributors

[![sdieunidou](https://avatars.githubusercontent.com/u/570763?v=4)](https://github.com/sdieunidou "sdieunidou (8 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/symkit-page-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/symkit-page-bundle/health.svg)](https://phpackages.com/packages/symkit-page-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[symfony/ai-bundle

Integration bundle for Symfony AI components

32642.2k24](/packages/symfony-ai-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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