FAQ
Hello everyone,

I'm a Mason web app developer and love the concept of Catalyst, but am
having a little trouble wrapping my brain around some code I've seen
in the MojoMojo example.

I understand keeping the template and the code that generates the data separate.

In the MojoMojo code set, /lib/MojoMojo/C/Page.pm I don't see where
the "data" for [% content = page.content %] that's in
/root/base/page/view.tt. How's it generated? I know it comes from
the database, but I can't see the line/lines of code that "make it
happen".

How does view.tt know that the "page" variable is available to it? Is
there a way to see what varaibles are available to a certain template?
How would I write a page like this with a very basic Mason template?

I've googled and searched CPAN for everything about Catalyst and can't
find any code samples for Mason with Catalyst.

I know it's still very young and would like to help put more docs
together, but are there any links or code samples that anyone could
throw my way to help me understand this?

Any help is appreciated!

Kevin
--
Kevin Old
kevinold@gmail.com

Search Discussions

  • Sebastian Riedel at May 2, 2005 at 12:15 am

    Am 01.05.2005 um 23:52 schrieb Kevin Old:
    In the MojoMojo code set, /lib/MojoMojo/C/Page.pm I don't see where
    the "data" for [% content = page.content %] that's in
    /root/base/page/view.tt. How's it generated? I know it comes from
    the database, but I can't see the line/lines of code that "make it
    happen".
    $c->stash->{foo} = 123; will be available as [% foo %]

    --
    sebastian

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050502/f675d7a9/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMay 1, '05 at 11:51p
activeMay 2, '05 at 12:15a
posts2
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Sebastian Riedel: 1 post Kevin Old: 1 post

People

Translate

site design / logo © 2022 Grokbase