** Sorry - hit send too soon on previous mail **
>
> This doesn't really involve TT. You just set them up as you normally
> would with mod_perl.
Thanks for the reply Perrin, I think I am 'almost' there.
My reason for posting here is that I want to be able to use tt2 to perform a
similar function to a JSP retrieving a collection of classes from a session
and displaying them through iteration.
I have tried adapting the e-toys code to a simple (i.e. without the
superclasses/utils etc.) module which handles a call to
/template/Hello.html, loads some info from a db (this was simply to test
some db interaction - I am actually loading a db row containing a key, name
& description) into the model and then uses tt2 to display the category in
/src/Hello.html.
I get a syntax error using the call :
my $view_data{'hello'} = $hello->view();
- but :
my %view_data;
my $view_data= $hello->view();
hits the db correctly (I've monitored the db), I just can't get at the data
in either the handler or the html
My final call is to
>
> This doesn't really involve TT. You just set them up as you normally
> would with mod_perl.
Thanks for the reply Perrin, I think I am 'almost' there.
My reason for posting here is that I want to be able to use tt2 to perform a
similar function to a JSP retrieving a collection of classes from a session
and displaying them through iteration.
I have tried adapting the e-toys code to a simple (i.e. without the
superclasses/utils etc.) module which handles a call to
/template/Hello.html, loads some info from a db (this was simply to test
some db interaction - I am actually loading a db row containing a key, name
& description) into the model and then uses tt2 to display the category in
/src/Hello.html.
I get a syntax error using the call :
my $view_data{'hello'} = $hello->view();
- but :
my %view_data;
my $view_data= $hello->view();
hits the db correctly (I've monitored the db), I just can't get at the data
in either the handler or the html
My final call is to
$template->process(
'Hello.html',\%view_data);
which loads the correct html file but will not display [% hello.description
%] etc (which are in the model).
If anyone has a small self-contained program which does a little of the
above & will show me how to put 'model' data into a session and the correct
file layout/conf settings I would be eternally grateful.
Thanks
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates