P'unk Avenue Window

pkContextCMS: a sneak preview for the worthy

March 11th, 2009 by Tom 14 Comments

logo


We’ve built a lot of sites over the past few years that emphasize a smooth transition between browsing and editing. Frequently-used administrative stuff doesn’t have to be hidden in a clumsy, generic back end application. And the editing experience doesn’t have to be ugly or involve a steep learning curve.

In the past we solved these problems with sfSimpleCMS, a widely used CMS (Content Management System, as you probably know) for Symfony 1.0. But as much as we’ve appreciated sfSimpleCMS, we’ve also accumulated a growing list of frustrations with it. And at the same time, Symfony 1.2 and Doctrine have come on the scene, offering exciting new possibilities that sfSimpleCMS doesn’t really leverage.

Enter pkContextCMS, our own CMS offering. Features of pkContextCMS include:

  • Editing takes place “in context.” sfSimpleCMS followed this principle for editing slots; we extend it to adding, removing and reordering subpages
  • Easy version control for the contents of every “slot” (editable piece of content)
  • “Areas,” continuous columns in which editors can add a variety of slots of different types (managed media slideshows interleaved with rich text, for instance)
  • Editing privileges for specific parts of the site can be easily assigned to specific users
  • All slot types, including the standard rich text and plaintext types, are implemented as Symfony modules with all the flexibility that implies
  • New slots can implement custom data storage via Doctrine column aggregation inheritance. (English translation: “oooh, cool!”)

The first beta release of pkContextCMSPlugin is now available. If you check it out, we strongly recommend that you literally check it out… in the subversion version control sense of the phrase. Our cmstest demo project is by far the friendliest way to install the CMS.

Our media plugin, already in use on an upcoming client site, adds even more capabilities via video and slideshow slots and will also be released soon.
picture-20


pkContextCMS is a big deal for P’unk Avenue and we’re excited about it. It’s an open source project, released under the MIT license, and we plan to embrace contributions from the community at large.

This first post is technically oriented, because at this stage pkContextCMS is most easily appreciated by those with the technical skills necessary to work with it. But we have big plans for it which will be far more easily appreciated by a wide audience. And we look forward to sharing those with you as they unfold.

14 Responses to “pkContextCMS: a sneak preview for the worthy

  1. Sid Says:

    Nice plugin guys

  2. Daniel Says:

    Hey Tom,
    I wrote to you about a week ago regarding your sfDoctrineApplyPlugin. I’d be really glad if you answered me. But by the looks of this introduction you already have your hands full.

    Great plugin, take over that uuuuugly TYPO3!!! :)

    Cheers, Daniel

  3. Tom Says:

    Hi Daniel,

    I’d be glad to help but I don’t have any emails from “Daniel” regarding sfDoctrineApplyPlugin.

    Please send your question to tom@punkave.com.

    Thanks!

  4. beleneglorion Says:

    Sound nice, but for my first try, the login page doesn’t work then impossible to test the cms :)

    where can i find help and give feedback about it :)

  5. Tom Says:

    Hi beleneglorion,

    You’re looking at a default install of sfDoctrineGuardPlugin when you’re looking at that admin screen. Log in as user admin password admin.

    We’ve set up a publicly accessible place to submit trouble tickets etc. Of course comments here are welcome as well. To talk to me directly write to tom@punkave.com.

    Cheers!

  6. Stephen Ostrow Says:

    Tom,
    I don’t know if this is what beleneglorion meant. But when I try to login with the default sfDoctrineGuardPlugin credentials I get redirected to a 404 page. This is a clean checkout of the cmstest project. Thanks for any help.

  7. Stephen Ostrow Says:

    Tom,
    Figured I’d let you know your routes are messed up. Well the pkContext routes are messing with the sfGuard Routes. So when you get to the login page, you’re going to /cms/sfGuardAuth/ for some reason rather than to /login which is the correct route for @sf_guard_login. But the form there is submitting to action /login which doesn’t exist. Same as /logout doesn’t exist either. When I commented out your route registration I was able to login. Then I re-enabled it and I can use the system.

  8. Stephen Ostrow Says:

    Tom,
    And I guess beleneglorion if you want to get this thing going because it looks cool so far.

    First
    /plugins/pkContextCMSPlugin/modules/pkContextCMS/templates/_login.php
    Line 14 should read:

    * Notice I’m using the routing name instead. It’s cleaner.

    Second, the main problem with the routing is line 11 of
    /plugins/pkContextCMSPlugin/lib/pkContextCMSRouting.php

    You’re making this a catch all basically is what’s killing the other routing rules. So You can prefix this with something or change it to
    $r->appendRoute(‘pk_context_cms_show’,

    and then remove the default_index route from /apps/frontend/config/routing.yml

    I personally chose to go with the latter, but it means the whole site will have to go through the cms which is fine for me.

  9. Tom Says:

    I’ve fixed this- do an svn update of your cmstest project and a symfony cc. I also released it as version 0.12. I opted to move the fancy “override the root of the site” routing rules to the cmstest project and documented the technique in the manual. The CMS plugin now defaults to the wimpier “everything in the CMS is under /cms unless you change the rules to suit your needs” approach. Most people won’t want that but it’s easy to override at the app level.

    Thanks to Stephen for his analysis of the issue.

  10. Tom Says:

    I’ve just released version 0.13 (and checked it in to svn of course) with further fixes to the routing rules to simplify matters. By using an explicit routing rule name rather than pkContextCMS/show in pkContextCMSTools::urlForPage() I’m able to implement short URLs to CMS pages without conflicting with the default Symfony rules, which is very handy.

  11. John Says:

    Hey Tom,

    Plugin looks cool! Thanks loads for making it available.

    One question . . .

    How do you approach the integration of bespoke modules, like a news module for example? In terms of routing (without /cms ) and being able to put a bespoke module/action link in the menu and for clients to move it in the structure?

    So you could have /my-cms-page and /news/list and for it to know where to route them and to be able to move them in the menu.

    Hope that makes sense.

    John

  12. Tom Says:

    Hi John,

    Check out the cmstest project. That project uses the usual Symfony default routing rule, which lights up all of your modules at the URL /modulename/actionname, without conflicting with the CMS. As long as the pk_context_cms_page rule comes last and the CMS invokes that rule by name when it wants to make a link to a page (which it does), then there’s no issue.

    You could also do individual routing rules for individual actions and put them first to make swankier URLs for frequently seen front end actions.

  13. John Says:

    Hey Tom,

    Just trying to setup cmstest and getting:

    ./symfony doctrine:data-load

    Notice: Undefined variable: conn in /home/bwdev/playground/pkContextCMS/plugins/pkToolkitPlugin/lib/pkZendSearch.class.php on line 170

    Fatal error: Call to a member function getTable() on a non-object in /home/bwdev/playground/pkContextCMS/plugins/pkToolkitPlugin/lib/pkZendSearch.class.php on line 170

    And also on the web page I get -

    Fatal error: Call to a member function setCulture() on a non-object in /home/bwdev/playground/pkContextCMS/plugins/pkContextCMSPlugin/lib/model/doctrine/PluginpkContextCMSPageTable.class.php on line 69

    I like your new demo site generator, you clever sod :-)

    John

  14. John Says:

    Just in case anyone else has trouble with saving settings for pages – try turning csrf off – worked for me.

Leave a Reply