[Catalyst] SubRequest and template recursion

Adeola Awoyemi adeola at digitalcraftsmen.net
Tue May 22 11:38:03 GMT 2007


Hi all,

I have a template (page.tt2) that uses TT's VIEW directive, where I'm  
making a sub-request:

[% BLOCK feed;
        data = Catalyst.subreq("/feed/$feed_url");
        data;
    END;
%]

In my controller:

sub get_feed : LocalRegex('^(.*$) ) {
     my ( $self, $c );
     my $src_url = $c->request->captures->[0];
     my $content = get($src_url); # already USE(ing) LWP::Simple above
     $c->stash->{source_string} = $content;
     $c->stash->{template} = 'feed.tt2';
}

But instead of a return of the results of running the source through  
the feed.tt2 template I get an error "file error - recursion into  
'page.tt2'".

Any help, hints would be gratefully appreciated.

Adeola.




--
Creative Developer - Digital Craftsmen Ltd
Exmouth House, 3 Pine Street
London, EC1R 0JH
t: +44 20 7183 1410
f: +44 20 7099 5140
m: +44 79 3952 0786
w: http://www.digitalcraftsmen.net/







More information about the Catalyst mailing list