[Catalyst] many Views that may include common display fragments
Matt S Trout
dbix-class at trout.me.uk
Tue May 8 13:24:13 GMT 2007
On Thu, Apr 26, 2007 at 10:25:09AM +1000, Steve H wrote:
> Again, thanks... and it's great to see such diversity in Catalyst usage and
> help offerred.
>
> To reiterate part of the problem.. in the final View that composes the
> (final) page, I'd want to include HTML fragments that were created by
> common functions (that could create them for other pages too). Trouble is,
> things came unstuck when I forward('someCommonFunction' ... which fires the
> controller to fetch the data, then it's associated View to actually create
> the HTML fragment; it would normally be plugged into response body, however
> the (Seamstress) resultant Tree object is also Stash'able or returned and
> the body could get ignored... when the forward() returns, I'd have the Tree
> (html'able) fragment that I could stitch into the main doc's html tree that
> is then finally rendered as_html().
> -- that's where it comes unstuck... it can't seem to recurse that stuff.
> Note that I'm using Seamstress (as opposed to TT).
The TT view supports a render() method to generate chunks for this sort of
purpose (plus the standard process() to fill res->body of course).
Maybe the Seamstress view needs bringing up to date.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://www.shadowcatsystems.co.uk/
More information about the Catalyst
mailing list