[Catalyst] PHP::View and Template::Toolkit

Jess Robinson castaway at desert-island.demon.co.uk
Tue Jun 20 14:29:16 CEST 2006


I suspect your problem is that views tend to expect data in one place 
(i.e. the stash, and a template file), and output it to another 
($c->res->body usually), if you want to run through one and then the 
other, you'll need to retrieve the result of the TT view from 
$c->res->body, and put it whereever the PHPView is expecting it..

Jess


On Tue, 20 Jun 2006, mnichols at mojosoft.org wrote:

>
> I have a Template toolkit working and and a PHP view working.  I would
> like to be able to use the template toolkit then pass to PHP or vise
> versa.  It was suggested that this could be done on irc, I have made
> some attempts at this with no luck.  I simply tried to forward on to
> the two views but of course as soon as I forward to one thats it. I
> tried to use the render and/or process instead of a forward but
> without any luck.
>
> $c->stash->{template}="template.with.php.tt"
> $c->forward("TToolkit::View");
> $c->forward("PHP::View");
>
> If anyone has a better understanding of what catalyst does in the view
> layer and might know how to solve this would be appreciated.
>
>
>
>
> Thanks
>
> Mojo
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>



More information about the Catalyst mailing list