[Catalyst] Page layout w/Catalyst
David K Storrs
dstorrs at dstorrs.com
Wed Dec 14 19:44:08 CET 2005
On Dec 13, 2005, at 10:02 PM, Kaare Rasmussen wrote:
> Hi
>
> As I'm new to Catalyst and TT I'd like to ask for advice about
> which bit will
> control what part of my page layout.
>
> The layout I'm planning to use has
> - A top part that rarely will change (perhaps breadcrumbs or some
> similar
> though)
> - A left menu. I'm thinking to use Tree::Simple
> - A bottom part for status information. I'd like to put validation
> info here
> too.
> - And finally the work area (central) where record lists and update
> pages will
> go.
>
> My first idea is to have Catalyst control it all. Does anyone think
> that TT
> does a better job? Or does anyone think this is a stupid way to do
> things?
Hi Kaare,
Andyg already answered your question, but I thought I'd take a whack
from a different perspective.
Catalyst is really just the overall framework, the collection of
modules. When you're working with actual code, there isn't really
such a beast as "Catalyst". There is your top-level application
(usually called MyApp), there are controllers, views, models,
plugins, etc. I'm guessing that when you say "have Catalyst control
it", you're thinking about a Controller object. Generally you would
want to use a View, and TT would be one example of a view.
So, if you have TT do the work, then you *are* having Catalyst
"control it all." Catalyst (the framework) will pre-populate various
objects that are useful to your TT templates (the $c variable and the
stash), and you can use the power of TT while readily accessing all
the advantages of Catalyst. You can have your cake and eat it too.
I hope this is useful, and that I didn't just rehash old news.
--Dks
More information about the Catalyst
mailing list