[Catalyst] Catalyst & Bricolage Integration

Perrin Harkins perrin at elem.com
Wed Nov 22 16:49:08 GMT 2006


Tobias Kremer wrote:
> This sounds like a cool idea. However, I must admit that I don't fully
> understand it. Can you give an example of what your metadata files contain?

Sure.  In some cases, we let people use the CMS to choose which fields 
will be required on a form.  The application needs to know this in a 
programmatic way.  It's anything specific to this instance of the 
application.  The most important thing is the name of the controller 
class to call.

> I suppose your "stub scripts" contain perl code which are eval'd by the
> CGI::Application backend?

Yes, but that's an unimportant implementation detail.  An XML file read 
by Catalyst would work just as well.

> I don't see a possibility to get Bricolage to publish a template AND some
> sort of metadata file at once. Is Krang capable of doing this (publish
> little data files WITH the templates that are then read by the backend
> application) or am I misunderstanding things here?

You understood correctly.  We publish a template (sometimes multiple 
templates) and a metadata file for every story that will run as an 
application.

> I now have a setup which allows me to publish stories from Bricolage
> into my Catalyst template space. This is not sufficient because Catalyst
> is not able to tell which story (i.e. id of story) it is dealing with to
> display dynamic stuff like user feedbacks to an article for example.
> That's where your metadata files come in, I suppose?

Yes, that's one of the things we would pass in.  You could get around 
this in various ways though.  You could embed the story in the template, 
in a way that is quick to parse out with a simple regex, or use the URL 
itself as a key (since it's unique).

- Perrin



More information about the Catalyst mailing list