Ron,


How can I enable Template Toolkit to process [% PERL %] statements in Maypole using FormBuilder?

I can see templates that don't eval perl in them.  But if there's an eval perl
I get:

perl error - EVAL_PERL not set

In my httpd.conf I have the following, but it doesn't seem to help:

PerlModule Apache::Template
TT2EvalPerl On


Thanks,
johnk

On 10/6/05, Ron McClain <[EMAIL PROTECTED]> wrote:
You'll need to add something like this in your driver:

Sub additional_data {
  My $r = shift;
  $r->{template_args}{mclass} = bless {}, $r->model_class;
}

The reason being, the templates call moniker and plural_moniker on the
model class, but if you say [% USE mclass = Class(request.model_class)
%], mclass will be wrapped in a proxy class, and moniker and
plural_moniker will return "proxy".


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] ] On Behalf Of David
Baird
Sent: Thursday, October 06, 2005 3:54 AM
To: [email protected]
Subject: Re: [Maypole] FormBuilder and TT templates.

On 10/6/05, Kieren Diment <[EMAIL PROTECTED]> wrote:
> Are there any generic TT templates available for FormBuilder?
> Fishing through the mailing list, it looks like Ron McClain made some
> at one point, but for now these 404.
>

There's a set included in the distro. They don't get installed
anywhere, so you need to fish them out of the build directory. Or just
download and unpack the distro. They're in the templates-tt subdir,
and were donated by Ron McClain. They were updated quite recently.

d.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users



--
eBay vs Amazon Shopping Comparison - Try it!
http://aytozon.com


Reply via email to