PHPackages                             kikwik/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. [Admin Panels](/categories/admin)
4. /
5. kikwik/page-bundle

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

kikwik/page-bundle
==================

Manage pages for symfony 6.4+

v0.11(1y ago)133MITPHPPHP &gt;=8.1

Since Sep 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kikwik/page-bundle)[ Packagist](https://packagist.org/packages/kikwik/page-bundle)[ RSS](/packages/kikwik-page-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (12)Used By (0)

Kikwik/PageBundle
=================

[](#kikwikpagebundle)

Manage pages with translations for symfony 6.4+

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

[](#installation)

1. require the bundle

```
#!/bin/bash
composer require kikwik/page-bundle
```

2. Define the `enabled_locales` in `config/packages/translation.yaml`

```
framework:
  default_locale: it
  enabled_locales: ['it','en','de','fr']
```

3. Optionally configure options in `config/packages/kikwik_page.yaml`

```
kikwik_page:
  admin_role: 'ROLE_ADMIN_PAGE'   # set to empty string to disable permission checker
  default_locale: '%kernel.default_locale%'
  enabled_locales: '%kernel.enabled_locales%'
  resolve_target_entities:
    page: App\Entity\Pages\Page
    page_translation: App\Entity\Pages\PageTranslation
    block: App\Entity\Pages\Block
```

4. Define your entity and make them extends base classes

```
// src/Entity/Pages/Page.php
namespace App\Entity\Pages;

use Doctrine\ORM\Mapping as ORM;
use Kikwik\PageBundle\Entity\AbstractPage;
use Kikwik\PageBundle\Model\PageInterface;

#[ORM\Entity()]
#[ORM\Table(name: 'kw_page__page')]
class Page extends AbstractPage implements PageInterface
{
}
```

```
// src/Entity/Pages/PageTranslation.php
namespace App\Entity\Pages;

use Doctrine\ORM\Mapping as ORM;
use Kikwik\PageBundle\Entity\AbstractPageTranslation;
use Kikwik\PageBundle\Model\PageTranslationInterface;

#[ORM\Entity()]
#[ORM\Table(name: 'kw_page__page_translation')]
class PageTranslation extends AbstractPageTranslation implements PageTranslationInterface
{
}
```

```
// src/Entity/Pages/Block.php
namespace App\Entity\Pages;

use Doctrine\ORM\Mapping as ORM;
use Kikwik\PageBundle\Entity\AbstractBlock;
use Kikwik\PageBundle\Model\BlockInterface;

#[ORM\Entity()]
#[ORM\Table(name: 'kw_page__block')]
class Block extends AbstractBlock implements BlockInterface
{
}
```

5. Clear your cache and update databse

```
symfony console cache:clear
symfony console doctrine:schema:update --force
```

### Page admin

[](#page-admin)

To activate the page admin feature add routes in `config/routes/kikwik_pages.yaml`:

```
kikwik_page_bundle_admin:
    resource: '@KikwikPageBundle/config/routes.xml'
    prefix: '/admin/page'
```

and create a PageFormLive component in `src/Twig/Components/PageFormLive.php`:

```
namespace App\Twig\Components;

use App\Entity\Pages\Page;
use Kikwik\PageBundle\Form\PageFormType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\DefaultActionTrait;
use Symfony\UX\LiveComponent\LiveCollectionTrait;

#[AsLiveComponent(template: '@KikwikPage/components/PageFormLive.html.twig')]
final class PageFormLive
{
    public function __construct(
        private FormFactoryInterface $formFactory,
    )
    {
    }

    use DefaultActionTrait;
    use LiveCollectionTrait;

    #[LiveProp]
    public ?Page $initialFormData = null;

    protected function instantiateForm(): FormInterface
    {
        return $this->formFactory->create(PageFormType::class, $this->initialFormData);
    }
}
```

Block
-----

[](#block)

A block renderer must be a TwigComponent that implements `Kikwik\PageBundle\Block\BlockComponentInterface`You can extend `BaseBlockComponent` and use `$this->getBlock()` to retrieve the Block entity and `$this->get('paramName')`to get the parameter value. The `buildEditForm` will be used in admin to create the form that will edit parameters

```
namespace App\Twig\Components;

use Kikwik\PageBundle\Block\BaseBlockComponent;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormInterface;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent]
class Alert extends BaseBlockComponent
{

    public function buildEditForm(FormInterface $form): void
    {
        $form
            ->add('type', ChoiceType::class, [
                'choices' => ['success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger'],
            ])
            ->add('message',TextareaType::class, [])
        ;
    }
}
```

```

    {{ this.get('message') | default('default message') }}

```

Child pages
-----------

[](#child-pages)

Page rendering will be handled by the internal controller `Kikwik\PageBundle\Controller\PageController`, If a URL that partially matches a page contains extra slug parts, an event will be triggered, and you can set a Response to display a different template. If your listener does not set the response, a 404 error will be thrown.

```
namespace App\EventListener;

use Kikwik\PageBundle\Event\PageExtraSlugEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
use Symfony\Component\HttpFoundation\Response;
use Twig\Environment;

#[AsEventListener(event: PageExtraSlugEvent::NAME, method: 'onPageExtraSlug')]
class PageExtraSlugListener
{

    public function __construct(
        private Environment $twig,
        private MyCustomController $customController,
    )
    {
    }

    public function onPageExtraSlug(PageExtraSlugEvent $event)
    {
        $pageTranslation = $event->getPageTranslation();
        $extraSlug = $event->getExtraSlug();

        if($extraSlug == 'some string that matches')
        {
            $response = $this->customController->customAction($pageTranslation);
            $event->setResponse($response);
        }
    }
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance50

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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 ~24 days

Recently: every ~49 days

Total

11

Last Release

368d ago

### Community

Maintainers

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

---

Top Contributors

[![kikwik](https://avatars.githubusercontent.com/u/58590255?v=4)](https://github.com/kikwik "kikwik (53 commits)")

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)

PHPackages © 2026

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