[Catalyst] Catalyst & Bricolage Integration
Tobias Kremer
tobias at funkreich.de
Tue Nov 21 11:48:16 GMT 2006
> It's pretty straightforward. Use Bricolage to publish content that
> Catalyst can then consume. We use Bricolage and Apache::Template like this
> a lot and it wouldn't be hard to integrate Catalyst instead.
So, just to make sure I'm understanding you correctly: This means that
Bricolage would just deliver templates for use in the Catalyst View?
This could be accomplished by adding a Bricolage destination that points into
Catalyst's "root" directory. The main application flow is still handled by
Catalyst and its controllers (which I like).
But I can't see how a controller should handle the stories burned by
Bricolage. Say the stories are burned to a Bricolage category called
"/story" (with possible sub-categories), then I'd have to create a
controller for "/story" which then has to dispatch to the story
(and page of story) referred to in the URL. I'm wondering if the following
is a sane way to accomplish this:
sub story : Regex('^story/([\w.\/\-]*)$') {
my( $self, $c ) = @_;
$c->stash->{template} = 'story/' . $c->req->captures->[0];
}
(I suppose, security checks on the incoming URL have to be implemented ...)
Any ideas are greatly appreciated!
-- Tobias
More information about the Catalyst
mailing list