Sonata-page Bundle CMS

At this point I was going to make a full stop and try to make a step by step installation, that is easy to configure and also self-understandable. But I come to the point of so much trial and error, apart of learning all the command-line stuff and reading installation procedures, that there is no point in stuffing around with Sonata Admin / Users / Pages Bundles if you don’t have the basics right.

So I will leave the SymfonyBaseAdmin as clean as possible, but anyone that wants to try to install it, will have to mess around and have some patience in order to make it work.

In this latest commit, I left the doctrine Orm settings with auto_mapping: true
That is something the Doctrine purist won’t like it so much, but it let’s you mess around adding/removing Bundles from the Symfony AppKernel.php without breaking the Doctrine:schema:update command line option to update the Tables. Now you can add or remove the sonata-page and sonata-user Bundles without messing with the config.yml every time.

One thing I noted after installing the Page Bundle, is that is quite useless without the User bundle, since is all tied up in the Admin area to work together. So at the end I installed and setted up the User Bundle too. I’m leaving the things separated in the config.yml file, so if you don’t need them simply comment or remove the :

  – { resource: sonata-page.yml }
– { resource: sonata-user.yml }

And their respective lines in the Symfony AppKernel

That said, it’s essential to read the Sonata Users and Pages documentation to play around with this.

After running the composer.phar to get all the required vendors, do not forget to run:

app/console sonata:easy-extends:generate SonataPageBundle –dest=”./src”

app/console sonata:easy-extends:generate SonataUserBundle –dest=”./src”

app/console doctrine:schema:update –force

And last step, generate an Admin user for the administration area:

app/console fos:user:create admin –super-admin

POST-ANNOTATIONS

There is another nifty detail that drove me crazy for some minutes, and is that the way that pages work, require that every time you update something is essential to make a new “snapshot” of the site.
So if you publish a set of pages, there won’t be seen by the router, until going to Site Admin and hitting the Create Snapshot button. That is something that I find quite annoying, but it shouldn’t be so hard to workaround.

After playing for about two days with the Page Bundle I can feel that is a powerful component to build your own pages. In no way is meant to act as a “client ready” CMS, it looks more like a straight “developer” tool, but of course with some heavy customization it will become some interesting addition to any project.

MUSIC
This days, while I keep on with my Sonata self-learning project, I’m hearing quite a lot of cool electronic music.
https://play.spotify.com/artist/7yxi31szvlbwvKq9dYOmFI
Along with some Berlin based independant artists, posting some playlists afterwards…

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s