[jifty-devel] Using Authentication::Password and Template::Declare

Edward Funnekotter efunneko at gmail.com
Tue Aug 7 22:05:57 EDT 2007


Thanks for your quick response Andrew.  I am working off the latest T::D, so
the use_mason_wrapper() method is available.

This did change my output a bit.  Now my page gets redirected to
errors/requested_private_component, which it complains about since it seems
that it doesn't exist for me.  Do I have to declare wrapper to be publicly
available?  I will keep digging myself, but if you happen to know the answer
it would be appreciated.



On 8/7/07, Andrew Sterling Hanenkamp <sterling at hanenkamp.com> wrote:
>
> EdF,
>
> I think we need to clean up some of the remarks regarding the usability of
> the Template::Declare stuff. It does not have the maturity of Mason, but I
> wouldn't say there are bugs crawling all over anymore. (At least not the
> latest repository version, I'm not sure what state the latest CPAN release
> is in.) I'd say it's certainly suitable for production use. The big problems
> now tend to be those that are resolved with more time investment in
> development.
>
> An /_elements/wrapper in Mason ought to work. I'm doing it on one of my
> applications which was started prior to the TD views being added to Jifty
> and I've never converted it.
>
> Do you have a View class defined? If you do, that might be the source of
> some of the trouble. Since the TD docs are spread across several classes, it
> might not be clear (and there's no example in this particular case either),
> but you should be able to call:
>
> __PACKAGE__->use_mason_wrapper();
>
> in your View class to switch it over to requesting /_elements/wrapper from
> Mason. That's defined in Jifty::View::Declare::BaseClass.
>
> Again, this is all based on using Jifty from a recent fetch from the
> Subversion repository. I don't know how different the CPAN release is.
>
> Cheers,
> Andrew
>
> On 8/7/07, Edward Funnekotter <efunneko at gmail.com> wrote:
>
> > Hi all,
> >
> > I have been building an app recently and decided to try to use the
> > Authentication::Password plugin to handle my user authentication.  Since the
> > Template::Declare stuff still looked fairly new ('BUGS: Crawling all over,
> > baby. Be very, very careful.") I figured I would stick to Mason templates.
> > My problem is that I have a _elements/wrapper that controls the main
> > elements of each page, except for the views that are inherited from the
> > Authentication::Password plugin.  They seem to not get any wrapper that I
> > can see.
> >
> > Some digging shows that they are using the Template::Declare paradigm.
> > My question is, how do I get those pages to use my wrapper.  If I can't do
> > that, how do I make a Template::Declare copy of my wrapper and get those
> > pages to use it?  I did read through the documentation, but that didn't
> > really clarify anything.  If there is a tutorial somewhere for
> > Template::Declare, please just point me to it or point me to some example
> > code.
> >
> > Thanks,
> > EdF
> >
> > _______________________________________________
> > jifty-devel mailing list
> > jifty-devel at lists.jifty.org
> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> >
> >
>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070807/8037c855/attachment.htm


More information about the jifty-devel mailing list