2017 © Pedro PelĂĄez
 

symfony-bundle content-bundle

A simple Symfony 2 CMS bundle using Mercury Editor

image

koala/content-bundle

A simple Symfony 2 CMS bundle using Mercury Editor

  • Wednesday, December 5, 2012
  • by flojon
  • Repository
  • 3 Watchers
  • 11 Stars
  • 71 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

KoalaContentBundle

KoalaContentBundle is a simple CMS built for the Symfony 2 framework using the amazing [Mercury Editor][1] as front end editor., (*1)

Build Status, (*2)

Install using composer (Symfony 2.1)

Add koala/content-bundle to composer.json., (*3)

"require": {
    ...
    "koala/content-bundle": "dev-master"        
}

Then run composer update to install KoalaContentBundle and all its requirements. Composer will automatically register the new namespaces., (*4)

Configuration

Register the new bundles in your app/AppKernel.php file:, (*5)

public function registerBundles()
{
    $bundles = array(
        ...
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        new Symfony\Cmf\Bundle\RoutingExtraBundle\SymfonyCmfRoutingExtraBundle(),
        new Koala\ContentBundle\KoalaContentBundle(),
    );

    return $bundles;
}

Enable the Doctrine Tree extension and the Symfony CMF router in your app/config/config.yml file:, (*6)

stof_doctrine_extensions:
    orm:
        default:
            tree: true

symfony_cmf_routing_extra:
    chain:
        routers_by_id:
            koala_content.dynamic_router: 200
            router.default: 100

Install assets:, (*7)

php app/console assets:install --symlink web

Install Mercury files under web/mercury. It's recommended to use the newest release, currently 0.8. (See See Mercury Downloads), (*8)

Download from https://github.com/downloads/jejacks0n/mercury/mercury-v0.8.0.zip and extract to web/mercury., (*9)

Next step is to setup the routing needed for the bundle to work. Add this to your app/config/routing.yml, (*10)

koala_content:
    resource: @KoalaContentBundle/Resources/config/routing.yml
    prefix: /

Note: By default Symfony has a _welcome route in app/config/routing_dev.yml which you need to remove if you want to use the root., (*11)

If you rather want to content pages under a separate section you can change the prefix to something like /cms, (*12)

The last step is to update the database schema and load some default content. Make sure you have setup your database config in app/config/parameters.yml before running the setup command:, (*13)

php app/console koala_content:setup

Now fire up your browser and start editing!, (*14)

External requirements

The Versions