PHPackages                             lexxpavlov/pagebundle - 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. lexxpavlov/pagebundle

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

lexxpavlov/pagebundle
=====================

Symfony2 Page bundle with meta data, predefined form type and Sonata Admin service

1.0.1(10y ago)3761MITPHPPHP &gt;=5.3.2

Since Nov 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/lexxpavlov/PageBundle)[ Packagist](https://packagist.org/packages/lexxpavlov/pagebundle)[ Docs](https://github.com/lexxpavlov/PageBundle)[ RSS](/packages/lexxpavlov-pagebundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

LexxpavlovPageBundle
====================

[](#lexxpavlovpagebundle)

This bundle helps you to manage your static pages in Symfony2 project.

The bundle has a page entity with fields:

- title - the title of page
- content - html content. May use ckeditor for easy wysiwyg edit of content
- slug - use as url of page. May be autogenerated based on title
- published - enable or disable page
- publishedAt, createdAt, updatedAt - Datetime fields, that contain actual information about page
- meta: keywords and description - SEO info

If you use SonataAdminBundle, this bundle automatically adds an entity to it.

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

[](#installation)

### Composer

[](#composer)

Download LexxpavlovPageBundle and its dependencies to the vendor directory. The bundle has a [StofDoctrineExtensionsBundle](https://github.com/stof/StofDoctrineExtensionsBundle) as required dependency and [IvoryCKEditorBundle](https://github.com/egeloen/IvoryCKEditorBundle) as optional dependency.

You can use Composer for the automated process:

```
$ php composer.phar require lexxpavlov/pagebundle
```

or manually add link to bundle into your `composer.json` and run `$ php composer.phar update`:

```
{
    "require" : {
        "lexxpavlov/pagebundle": "~1.0"
    },
}
```

Composer will install bundle to `vendor/lexxpavlov` directory. Bundle StofDoctrineExtensionsBundle will be installed automatically, if it didn't install earlier.

### Adding bundle to your application kernel

[](#adding-bundle-to-your-application-kernel)

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new Lexxpavlov\PageBundle\LexxpavlovPageBundle(),
        // ...
    );
}
```

If you are already have `StofDoctrineExtensionsBundle` in the your `AppKernel`, you don't need to add its twice.

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

[](#configuration)

First you must create your own page entity class. It's easy to make by extend base page from bundle.

```
